public void CurrentTimeIsWithinTimeBounds() { Stellar.Transaction tx = this.GenerateSignedChallenge(_fixture.UserKeypair, _fixture.DevKeypair); Library.Auth.Token token = new Library.Auth.Token(_fixture.DevKeypair.SecretSeed, tx.ToEnvelopeXdrBase64(), _fixture.UserKeypair.AccountId); Assert.True(token.Validate()); }
public void ThrowsErrorIfCurrentTimeIsOutsideTimeBounds() { Stellar.Transaction tx = this.GenerateSignedChallenge(_fixture.UserKeypair, _fixture.DevKeypair); Library.Auth.Token token = new Library.Auth.Token(_fixture.DevKeypair.SecretSeed, tx.ToEnvelopeXdrBase64(), _fixture.UserKeypair.AccountId); System.Threading.Thread.Sleep(11000); Assert.ThrowsAny <Exception>(() => token.Validate()); }