コード例 #1
0
        public void ShouldReturnConfiguredExpiration()
        {
            var settingsHolder       = new SettingsHolder();
            var configuredExpiration = TimeSpan.FromSeconds(10);

            settingsHolder.Set(new AuditConfigReader.Result
            {
                TimeToBeReceived = configuredExpiration
            });

            Assert.True(AuditConfigReader.TryGetAuditMessageExpiration(settingsHolder, out var expiration));
            Assert.AreEqual(configuredExpiration, expiration);
        }
コード例 #2
0
 public void ShouldReturnFalseIfNoExpirationIsConfigured()
 {
     Assert.False(AuditConfigReader.TryGetAuditMessageExpiration(new SettingsHolder(), out _));
 }