public void should_throw_if_args_is_null() { // Arrange var processor = new UpdateExpirationInterval(); // Act Action action = () => processor.Process(null); // Assert action.ShouldThrow <ArgumentNullException>().WithMessage("Value cannot be null.\r\nParameter name: args"); }
public void should_update_exired_interval() { // Arrange var processor = new UpdateExpirationInterval(); var args = new SynchronizeTreeArgs { Context = this.synchContext }; var configData = IntegrationCache.GetIntegrationConfigData(this.itemId); configData.ExpirationDate = DateTime.Now.AddDays(-1); configData.IsExpired.Should().BeTrue(); // Act processor.Process(args); // Assert IntegrationCache.GetIntegrationConfigData(this.itemId).IsExpired.Should().BeFalse(); }