Exemplo n.º 1
0
        public void BugService_save_simple_bug()
        {
            var idBug = Guid.NewGuid();

            _bugRepository.Setup(x => x.Insert(It.IsAny <Data.Entity.Bug>())).Returns(idBug);

            var resut = _bugService.Insert(_bug);

            _bugRepository.Verify(x => x.Insert(It.IsAny <Data.Entity.Bug>()), Times.Once());
            Assert.AreEqual(resut, idBug);
        }