public void Get_OnInvoke_ReturnsExpectedMessage() { var controller = new PaymentsenseCodingChallengeController(); var result = controller.Get().Result as OkObjectResult; result.StatusCode.Should().Be(StatusCodes.Status200OK); result.Value.Should().Be("Paymentsense Coding Challenge!"); }
public void Get_OnInvoke_ReturnsExpectedMessage() { var controller = new PaymentsenseCodingChallengeController(); var result = controller.Get().Result as OkObjectResult; result.StatusCode.Should().Be(StatusCodes.Status200OK); var countries = result.Value.Should().BeAssignableTo <IEnumerable <Country> >(); }
public PaymentsenseCodingChallengeControllerTests() { var countryClient = Substitute.For <ICountryClient>(); _controller = new PaymentsenseCodingChallengeController(countryClient); }