public void GetSeriesFixtureForSeasonTest() { const int season = 30; const int htSeriesId = 1000; var country = TestEntities.CreateCountry(66, "EnglishName", "CountryName"); List<Series> series = TestEntities.CreateSeries(htSeriesId, country); var sessionFactory = SessionFactory.CreateSessionFactory(true); using (var session = sessionFactory.OpenSession()) { using (session.BeginTransaction()) { session.SaveOrUpdate(country); foreach (var league in series) { session.SaveOrUpdate(league); } session.Transaction.Commit(); } } var repository = new SeriesRepository(SessionManager.CurrentSession); var fixtures = repository.GetSeriesFixtureForSeason(htSeriesId, season); Assert.True(fixtures.Count == 1); }