예제 #1
0
        public void Should_return_not_found()
        {
            _kinlyConfiguration = null;
            _controller         = new SelfTestController(Options.Create(_kinlyConfiguration), _mockLogger.Object);

            var response = (NotFoundResult)_controller.GetPexipServicesConfiguration();

            response.StatusCode.Should().Be((int)HttpStatusCode.NotFound);
        }
예제 #2
0
        public void Should_return_okay_with_response()
        {
            _kinlyConfiguration = new KinlyConfiguration();
            _controller         = new SelfTestController(Options.Create(_kinlyConfiguration), _mockLogger.Object);
            _kinlyConfiguration.PexipSelfTestNode = "test.self-test.node";

            var response = (OkObjectResult)_controller.GetPexipServicesConfiguration();

            response.Should().NotBeNull();
            var pexipConfig = (PexipConfigResponse)response.Value;

            pexipConfig.PexipSelfTestNode.Should().Be(_kinlyConfiguration.PexipSelfTestNode);
        }