よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
public void CreateOrder_WhenDoesntExist_ReturnsNotFound() { _customerRepository.Exists(Arg.Any <int>()).Returns(false); IActionResult actionResult = _controller.CreateOrder(1, new List <ProductRequest>()); var result = actionResult as NotFoundResult; Assert.NotNull(result); _customerRepository.Received(1).Exists(1); }