public void InvalidBadge1() { Badge b = new Badge { Name = "", UserId = 1 }; db.Badges.Add(b); db.SaveChanges(); }
public void InvalidBadge2() { Badge b = new Badge { UserId = 1 }; db.Badges.Add(b); db.SaveChanges(); }
public void DefaultsForNewBadge() { Badge b = new Badge(); //should not be null Assert.IsNotNull(b.Created_At, "Created_At should not be null"); //Expected Default values Assert.IsTrue(b.Created_At == StringToDateTime.ToUnixTimeStamp(DateTime.Now), "Created At should be initialized to DateTime.Now.ToString()"); }
public void InvalidBadge3() { Badge b = new Badge { Name = "BestAnswer" }; db.Badges.Add(b); db.SaveChanges(); }