public void GetFacultativeById() { RestoreDate(); var FacultativeRepository = new FacultativeRepository(mockContext.Object); Facultative Facultative = new Facultative(); FacultativeRepository.Add(Facultative); Assert.IsNotNull(_Facultatives.FirstOrDefault()); Assert.IsNotNull(FacultativeRepository.Get(Facultative.Id)); }
public void AddFacultative() { RestoreDate(); var FacultativeRepository = new FacultativeRepository(mockContext.Object); Facultative Facultative = new Facultative(); FacultativeRepository.Add(Facultative); Assert.IsNotNull(_Facultatives.Where(s => Facultative.Id == s.Id).FirstOrDefault()); Assert.AreEqual(FacultativeRepository.Get(Facultative.Id).Id, Facultative.Id); }
public void DeleteFacultative() { RestoreDate(); var FacultativeRepository = new FacultativeRepository(mockContext.Object); Facultative Facultative = new Facultative(); FacultativeRepository.Add(Facultative); FacultativeRepository.Remove(Facultative); Assert.IsNull(_Facultatives.Where(s => Facultative.Id == s.Id).FirstOrDefault()); }