public void GetAllMealsForDate() { var configurationMock = new Mock<IConfiguration>(); configurationMock.Setup( x => x.DataSource ).Returns( DataSourceType.XMLFile ); configurationMock.Setup( x => x.FileName ).Returns( FullTestData.DataFileName ); FullTestData.Reset(); var dataRepository = new HealthTracker.DataRepository.Services.DataRepository( configurationMock.Object ); var mealsForDay = dataRepository.GetAllMealsForDate( new DateTime( 2010, 7, 18 ) ); Assert.AreEqual( 2, mealsForDay.Count ); // TODO: Verify the meals mealsForDay = dataRepository.GetAllMealsForDate( new DateTime( 2010, 7, 19 ) ); Assert.AreEqual( 1, mealsForDay.Count ); // TODO: Verify the meals mealsForDay = dataRepository.GetAllMealsForDate( new DateTime( 2010, 7, 21 ) ); Assert.AreEqual( 0, mealsForDay.Count ); }