コード例 #1
0
        public void IsTokenValid_ReturnsTrue_WhenTokenIsValid()
        {
            // Arrange
            TokenResult tokenResult = new TokenResult();

            // Act
            bool result = MobileAppUser.IsTokenValid(tokenResult);

            // Assert
            Assert.True(result);
        }
コード例 #2
0
        public void IsTokenValid_ReturnsFalse_WhenTokenIsInvalid()
        {
            // Arrange
            // This is what is returned when a token is not found.
            TokenResult tokenResult = new TokenResult()
            {
                Diagnostics = "Token not found in store. id=sid:90BF712CA4464DDCADED130D8E5D1D8E, name=Twitter"
            };

            // Act
            bool result = MobileAppUser.IsTokenValid(tokenResult);

            // Assert
            Assert.False(result);
        }