public void WhenShopExistsThenUpdateShopAndReturnSuccessfull() { var shopRepository = new Mock <IShopRepository>(); shopRepository.Setup(r => r.GetShopById(new Guid("{4BA29681-3FA1-431E-8C98-12E3B952BA25}"))).Returns(new Shop()); var shopConfigurationService = new ShopConfigurationService(shopRepository.Object); ServiceActionResult actionResult = shopConfigurationService.ShopActivation(new Guid("{4BA29681-3FA1-431E-8C98-12E3B952BA25}"), It.IsAny <bool>()); actionResult.Should().Be(ServiceActionResult.Successfull); }
public void WhenShopFoundThenEditShopReturnSuccessfull() { var shopRepository = new Mock <IShopRepository>(); shopRepository.Setup(r => r.GetShopById(new Guid("{4BA29681-3FA1-431E-8C98-12E3B952BA25}"))).Returns(new Shop() { Address = new UserAddress() }); var shopConfigurationService = new ShopConfigurationService(shopRepository.Object); ServiceActionResult actionResult = shopConfigurationService.EditShop(new ShopDto() { ShopGuid = new Guid("{4BA29681-3FA1-431E-8C98-12E3B952BA25}"), Address = new UserAddressDto() }); actionResult.Should().Be(ServiceActionResult.Successfull); }