public void Password_CantValidateExpiredPassword() { // Arrange var timeProvider = new MockTimeProvider(); var generator = new PasswordGenerator(ThirtySeconds, ValidSecret, timeProvider); // Act var password = generator.Generate(ValidUid); timeProvider.Set(DateTime.UtcNow.AddSeconds(31)); var valid = generator.Validate(ValidUid, password); // Assert Assert.False(valid); }