public void ReturnTrueWhenTryParseIsCalledWithAnEventuallyConsistentTagLabel(string label) { Assert .IsTrue( EventuallyConsistentTagParser.TryParse(label, out var tag)); Assert.IsNotNull(tag); }
public void ReturnFalseWhenTryParseIsCalledWithADifferentTagLabel() { Assert .IsFalse( EventuallyConsistentTagParser.TryParse("somethingElse", out var tag)); Assert.IsNull(tag); }
public void SetTheOutVariableWithTheExpectedEventuallyConsistentTagWhenABothWithinAndRetryIntervalValuesAreProvidedInTheLabel(string label) { EventuallyConsistentTagParser.TryParse(label, out var tag); Assert.AreEqual( TimeSpan.FromSeconds(30), tag.Within); Assert.AreEqual( TimeSpan.FromSeconds(10), tag.RetryInterval); }
public void SetTheOutVariableWithTheExpectedEventuallyConsistentTagWhenARetryIntervalValueIsProvidedInTheLabel() { EventuallyConsistentTagParser.TryParse("eventuallyConsistent(retryInterval=00:00:10)", out var tag); Assert.AreEqual( TimeSpan.FromSeconds(20), tag.Within); Assert.AreEqual( TimeSpan.FromSeconds(10), tag.RetryInterval); }
public void SetTheOutVariableWithTheExpectedEventuallyConsistentTagWhenNoSettingsAreProvidedInTheLabel() { EventuallyConsistentTagParser.TryParse("eventuallyConsistent", out var tag); Assert.AreEqual( TimeSpan.FromSeconds(20), tag.Within); Assert.AreEqual( TimeSpan.FromSeconds(5), tag.RetryInterval); }