コード例 #1
0
        public void ResponseIsServerError_WhenInjectionPerformed()
        {
            var errorResponseTransform = new ErrorResponseTransform(new RateManager(), () => 1);
            var originalResponse       = new Response(ResponseCode.Ok);

            var actual = errorResponseTransform.Transform(originalResponse);

            actual.Should().BeEquivalentTo(new Response(ResponseCode.InternalServerError));
        }
コード例 #2
0
        public void ResponseIsNotChanged_WhenInjectionNotPerformed()
        {
            var errorResponseTransform = new ErrorResponseTransform(new RateManager(), () => 0);
            var originalResponse       = new Response(ResponseCode.Ok);

            var actual = errorResponseTransform.Transform(originalResponse);

            actual.Should().Be(originalResponse);
        }