コード例 #1
0
        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));
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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());
        }