Exemplo n.º 1
0
        public void CategoriesForSelectDialog_should_return_JsonResult_when_invoked()
        {
            service.Setup(x => x.List()).Returns(Fakes.FakeCategoryList()).Verifiable();
            service.Setup(x => x.ListCategoriesForProduct(It.IsAny <Guid>())).Returns(Fakes.FakeCategoryList())
            .Verifiable();

            var action = controller._CategoriesForSelectDialog(Guid.NewGuid());

            Assert.That(action, Is.Not.Null);
            Assert.That(action, Is.InstanceOf <JsonResult>());
            service.VerifyAll();
        }