Restructure

This commit is contained in:
2020-02-22 23:56:45 +00:00
parent 1ec3054094
commit 042c69baf2
131 changed files with 479 additions and 280 deletions
@@ -0,0 +1,46 @@
using Xunit;
using System.Linq;
using SuccessfulCode.BetfairApi.BettingModels;
namespace SuccessfulCode.BetfairApi.Tests
{
public class EventsTests
{
[Theory]
[InlineData(TestSettings.Username, TestSettings.Password, TestSettings.AppKey)]
public void TestGetEventsTypes(string username, string password, string appKey)
{
//Arrange
var auth = new Authentication(username, password, appKey);
var client = new BettingApiClient(auth);
//Act
var eventsTypes = client.ListEventTypes(new BettingModels.MarketFilter()).Result;
//Assert
Assert.True(eventsTypes.Length > 0);
}
[Theory]
[InlineData(TestSettings.Username, TestSettings.Password, TestSettings.AppKey)]
public void TestGetEvents(string username, string password, string appKey)
{
//Arrange
var auth = new Authentication(username, password, appKey);
var client = new BettingApiClient(auth);
var eventTypes = client.ListEventTypes(new MarketFilter()).Result;
var horseRacingEventType = eventTypes.FirstOrDefault(e => e.EventType.Name == "Horse Racing");
var filter = new MarketFilter()
{
EventTypeIds = new[] { horseRacingEventType.EventType.Id },
MarketCountries = new[] { "IE", "US" }
};
//Act
var horseRacingEvents = client.ListEvents(filter).Result;
//Assert
Assert.True(horseRacingEvents.Length > 0);
}
}
}