コード例 #1
0
        public void ToToken_WhenCalled_ReturnsRefreshableToken()
        {
            IContactCommand sut = CreateSut();

            IRefreshableToken result = sut.ToToken();

            Assert.That(result, Is.TypeOf <Domain.Security.RefreshableToken>());
        }
コード例 #2
0
        public void ToToken_WhenCalled_ReturnsRefreshableTokenWithExpiresFromCommand()
        {
            DateTime        expires = _fixture.Create <DateTime>();
            IContactCommand sut     = CreateSut(expires: expires);

            DateTime result = sut.ToToken().Expires;

            Assert.That(result, Is.EqualTo(expires));
        }
コード例 #3
0
        public void ToToken_WhenCalled_ReturnsRefreshableTokenWithRefreshTokenFromCommand()
        {
            string          refreshToken = _fixture.Create <string>();
            IContactCommand sut          = CreateSut(refreshToken: refreshToken);

            string result = sut.ToToken().RefreshToken;

            Assert.That(result, Is.EqualTo(refreshToken));
        }
コード例 #4
0
        public void ToToken_WhenCalled_ReturnsRefreshableTokenWithTokenTypeFromCommand()
        {
            string          tokenType = _fixture.Create <string>();
            IContactCommand sut       = CreateSut(tokenType);

            string result = sut.ToToken().TokenType;

            Assert.That(result, Is.EqualTo(tokenType));
        }