public void Constructor_WithValidParameter_ShouldBeInitializedWithEmptyToken()
        {
            var identity = IdentityBuilder.Create().Build();
            var token    = new OneDriveToken(identity);

            var expected = "";
            var actual   = token.GetToken();

            Assert.Equal(expected, actual);
        }
Ejemplo n.º 2
0
        public async void GetToken_WithValidToken_MustResultItsValue()
        {
            var dummyToken = "My Dummy Token";
            var scopes     = new string[] { "A" };
            var identity   = IdentityBuilder
                             .Create()
                             .WithScopes(scopes)
                             .WithAcquireTokenFromIdentity(dummyToken, DateTimeOffset.UtcNow, scopes)
                             .Build();
            var token = new OneDriveToken(identity);

            await token.AcquireTokenAsync();

            var actual = token.GetToken();

            Assert.Equal(dummyToken, actual);
        }