public void DeleteLocalRepositoryTest() { //Arrange ILocalRepository repository = new LocalRepository(); //Action var deletedLocal = repository.Delete(2); //Assert var persistedLocal = _contextForTest.Locais.Find(2); Assert.IsNull(persistedLocal); }
public void RetrieveLocalRepositoryTest() { //Arrange ILocalRepository repository = new LocalRepository(); //Action Local local = repository.Get(2); //Assert Assert.IsNotNull(local); Assert.IsTrue(local.Id > 0); }
public void CreateLocalRepositoryTest() { //Arrange Local p = ObjectMother.GetLocal(); ILocalRepository repository = new LocalRepository(); //Action Local newLocal = repository.Save(p); //Assert Assert.IsTrue(newLocal.Id > 0); }