Esempio n. 1
0
        public void ReturnTrueWhenTryParseIsCalledWithAnEventuallyConsistentTagLabel(string label)
        {
            Assert
            .IsTrue(
                EventuallyConsistentTagParser.TryParse(label, out var tag));

            Assert.IsNotNull(tag);
        }
Esempio n. 2
0
        public void ReturnFalseWhenTryParseIsCalledWithADifferentTagLabel()
        {
            Assert
            .IsFalse(
                EventuallyConsistentTagParser.TryParse("somethingElse", out var tag));

            Assert.IsNull(tag);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        public void SetTheOutVariableWithTheExpectedEventuallyConsistentTagWhenNoSettingsAreProvidedInTheLabel()
        {
            EventuallyConsistentTagParser.TryParse("eventuallyConsistent", out var tag);

            Assert.AreEqual(
                TimeSpan.FromSeconds(20),
                tag.Within);

            Assert.AreEqual(
                TimeSpan.FromSeconds(5),
                tag.RetryInterval);
        }