public void WhenAlgorithmDoesNotAllowInclusionOfCreatedHeader_ThrowsHttpMessageSigningException(string algorithmName)
            {
                var    sut = new CreatedHeaderAppender(algorithmName, _timeOfComposing);
                Action act = () => sut.BuildStringToAppend(HeaderName.PredefinedHeaderNames.Created);

                act.Should().Throw <HttpMessageSigningException>();
            }
Пример #2
0
            public void WhenTimeOfComposingHasNoValue_ReturnsEmptyString()
            {
                var sut = new CreatedHeaderAppender(null);

                var actual = sut.BuildStringToAppend(HeaderName.PredefinedHeaderNames.Created);

                actual.Should().Be(string.Empty);
            }
            public void ReturnsExpectedString()
            {
                var sut = new CreatedHeaderAppender("hs2019", _timeOfComposing);

                var actual = sut.BuildStringToAppend(HeaderName.PredefinedHeaderNames.Created);

                var expected = "\n(created): 1582539614";

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