public void ToToken_WhenCalled_ReturnsRefreshableToken() { IContactCommand sut = CreateSut(); IRefreshableToken result = sut.ToToken(); Assert.That(result, Is.TypeOf <Domain.Security.RefreshableToken>()); }
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)); }
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)); }
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)); }