Exemplo n.º 1
0
        public void HasErrorLabel_should_have_expected_result(
            [Values(0, 1, 2, 3)] int existingCount)
        {
            var subject = new MongoException(_message);
            for (var i = 0; i < existingCount; i++)
            {
                var errorLabel = $"label{i}";
                subject.AddErrorLabel(errorLabel);
            }

            foreach (var errorLabel in subject.ErrorLabels)
            {
                subject.HasErrorLabel(errorLabel).Should().BeTrue();
            }
            subject.HasErrorLabel("x").Should().BeFalse();
        }