Beispiel #1
0
        public void TokenIsExpiredHasCorrectValue()
        {
            var expiry = DateTime.UtcNow.AddSeconds(1).ToUnixTime();
            var token  = new ArcGIS.ServiceModel.Operation.Token {
                Value = "blah", Expiry = expiry
            };

            Assert.NotNull(token);
            Assert.NotNull(token.Value);
            Assert.False(token.IsExpired);
            Thread.Sleep(TimeSpan.FromSeconds(2));
            Assert.True(token.IsExpired);
        }
Beispiel #2
0
 protected CommonParameters(String format, Token token)
 {
     Format = format;
     if (token != null) Token = token.Value;
 }
Beispiel #3
0
 protected CommonParameters(Token token)
     : this("json", token)
 { }