public void CreateFixtureWithInvalidGeneratorName() { login.CreateSession("sSanchez", "user"); FixtureServices fixtureServices = new FixtureServices(login, encounterRepo, sportRepo, teamRepo, assemblyLoader, commentRepo); fixtureServices.CreateFixture("A non existant fixture generator", "Futbol", new DateTime(3000, 10, 10)); }
public void CreateAutoGeneratedFixtureWithoutPermissions() { login.CreateSession("martinFowler", "user"); FixtureServices fixtureServices = new FixtureServices(login, encounterRepo, sportRepo, teamRepo, assemblyLoader, commentRepo); fixtureServices.CreateFixture("AllOnce", "Futbol", new DateTime(3000, 10, 10)); }
public void CreateAutoGeneratedFixtureWithOverlappingDates() { login.CreateSession("sSanchez", "user"); FixtureServices fixtureServices = new FixtureServices(login, encounterRepo, sportRepo, teamRepo, assemblyLoader, commentRepo); fixtureServices.CreateFixture("AllOnce", "Futbol", new DateTime(3000, 10, 10)); fixtureServices.CreateFixture("AllOnce", "Futbol", new DateTime(3000, 10, 10)); }
public void GetAvailableFixtureGenerators() { login.CreateSession("sSanchez", "user"); FixtureServices fixtureServices = new FixtureServices(login, encounterRepo, sportRepo, teamRepo, assemblyLoader, commentRepo); IEnumerable <string> actual = fixtureServices.GetAvailableFixtureGenerators(); Assert.IsTrue(actual.Contains("AllOnce")); Assert.IsTrue(actual.Contains("RoundRobin")); }
public void CreateAutoGeneratedFixtureWithoutTeams() { login.CreateSession("sSanchez", "user"); FixtureServices fixtureServices = new FixtureServices(login, encounterRepo, sportRepo, teamRepo, assemblyLoader, commentRepo); fixtureServices.CreateFixture("RoundRobin", "Basquetball", new DateTime(3000, 10, 10)); IEnumerable <Encounter> encounters = encounterRepo.GetAll(); Assert.AreEqual(0, encounters.Count()); }
public void CreateAutoGeneratedFixtureAllOnce() { login.CreateSession("sSanchez", "user"); FixtureServices fixtureServices = new FixtureServices(login, encounterRepo, sportRepo, teamRepo, assemblyLoader, commentRepo); fixtureServices.CreateFixture("AllOnce", "Futbol", new DateTime(3000, 10, 10)); IEnumerable <Encounter> expected = new AllOnce().GenerateFixture(teamRepo.GetAll(), new DateTime(3000, 10, 10)); IEnumerable <Encounter> actual = encounterRepo.GetAll(); Assert.AreEqual(expected.Count(), actual.Count()); }
protected void PreInstallFixtures(ITransactionManager transactionManager) { fixtureServices = new FixtureServices(); }