Esempio n. 1
0
        public void Adopt_Fail()
        {
            var service = GetMockedAdoptionService();
            var guid1   = Guid.NewGuid();
            var guid2   = Guid.NewGuid();

            service.Setup(x => x.Adopt(guid1, guid2)).Returns(GetFailOperationResult());

            var controller = new AdoptionsController(service.Object);
            var result     = (OperationResult)controller.Adopt(guid1, guid2).Data;

            Assert.IsFalse(result.Success);
            Assert.IsNotEmpty(result.Message);
        }