//Gives you a fake in memory db with a fake profile ready to go. public void SetupFakeWithDb() { profileData = new SqlProfileData(FitnessTrackerDbContext.MockDBContextFactory()); fakeNewProfile(); //Act profileData.Add(fakeProfile); }
public void AddingProfileByElements_ProfileInDBset() { //Arrange profileData = new SqlProfileData(FitnessTrackerDbContext.MockDBContextFactory()); fakeProfile = new FitnessProfile(); var discExcPlans = new List <DiscreteExercisePlan>(); discExcPlans.Add(new DiscreteExercisePlan(true)); fakeProfile.DiscreteExercisePlans = discExcPlans; //Act profileData.Add(testEmail, new DiscreteExercisePlan(true)); //Assert var addResult = profileData.db.UserProfiles.Find(testEmail); Assert.That(addResult, Is.Not.Null); }