public void InvalidFavorite1() { Favorite f = new Favorite { UserId = 1 }; db.Favorites.Add(f); db.SaveChanges(); }
public void InvalidFavorite2() { Favorite f = new Favorite { QuestionId = 1 }; db.Favorites.Add(f); db.SaveChanges(); }
public void DefaultForNewFavorite() { Favorite f = new Favorite(); // Should not be null Assert.IsNotNull(f.Created_At, "Created_At should not be null"); //Expected Default Values Assert.IsTrue(f.Created_At == DateTime.Now.ToString(), "Created_At should be initialized to DateTime.Now.ToString()"); }