public void DeleteApplications() { var currentCnt = testCtx.Applications.Count(); var entity = testCtx.Applications.First(); repo.Delete(entity.ApplicationId); repo.Save(); Assert.IsTrue(testCtx.Applications.Count() == --currentCnt); }
public void InsertType() { var currentCnt = testCtx.Applications.Count(); var newFaker = new Faker <Applications>() .RuleFor(r => r.ApplicationId, f => f.Random.Uuid()) .RuleFor(r => r.Description, f => f.Lorem.Sentence(5)) .RuleFor(r => r.LastUpdatedbyUser, f => f.Random.Uuid()) .RuleFor(r => r.ApplicationName, f => f.Lorem.Word()) .RuleFor(r => r.BannerEnable, f => f.Random.Bool()) .RuleFor(r => r.SupportEmail, f => f.Internet.ExampleEmail()); var fk = newFaker.Generate(); repo.Insert(fk); repo.Save(); Assert.IsTrue(testCtx.Applications.Count() == ++currentCnt); var entity = testCtx.Applications.First(f => f.ApplicationId == fk.ApplicationId); Assert.AreEqual(fk.ApplicationId, entity.ApplicationId); Assert.AreEqual(fk.ApplicationName, entity.ApplicationName); }