Пример #1
0
        public void CursusPostTest()
        {
            using (var repo = new CursusInstantieRepositoryMock())
            {
                Assert.AreEqual(0, repo.TimesCalled);

                var target = new CursusInstantieController(repo);

                target.Post(new List <CursusInstantie>());

                Assert.AreEqual(1, repo.TimesCalled);
            }
        }
Пример #2
0
        public void CursusPostReturned200Test()
        {
            using (var repo = new CursusInstantieRepositoryMock())
            {
                Assert.AreEqual(0, repo.TimesCalled);

                var target = new CursusInstantieController(repo);

                dynamic result = target.Post(new List <CursusInstantie>());

                Assert.AreEqual(1, repo.TimesCalled);
                Assert.AreEqual(200, result.StatusCode);
            }
        }