Ejemplo n.º 1
0
        public void OwnerControllerTest_GetAllOwnerPetList_OK()
        {
            var             mockOwnerPetService = new Mock <IOwnerPetService>();
            List <OwnerPet> ownerPetList        = new List <OwnerPet>();

            mockOwnerPetService.Setup(x => x.GetAllOwnerPetList()).ReturnsAsync(ownerPetList);


            var controller = new OwnerController(mockOwnerPetService.Object)
            {
            };

            // Act
            var response = controller.GetAllOwnerPetList();

            // Assert
            Assert.IsInstanceOfType(response, typeof(Task <PetOwnerDTO.OwnerPetList>), "Correct Model");
        }