Example #1
0
        public void GetMetadata_returns_metadata_which_does_not_match_a_criterion_for_the_predicate_function_hasallof()
        {
            // Arrange
            var criterion = Criterion.FromElementAndPredicateFunctionWithConstantValues("sprint", "hasallof", "one", "two");
            var sut       = IsInSprintConversionStrategy.GetMetadata();

            // Act
            var result = sut.CanConvert(criterion);

            // Assert
            Assert.That(result, Is.False);
        }
Example #2
0
        public void GetMetadata_returns_metadata_which_matches_a_criterion_for_sprint_equals_a_constant()
        {
            // Arrange
            var criterion = Criterion.FromElementPredicateAndConstantValue("sprint", "=", "one");
            var sut       = IsInSprintConversionStrategy.GetMetadata();

            // Act
            var result = sut.CanConvert(criterion);

            // Assert
            Assert.That(result, Is.True);
        }
Example #3
0
        public void GetMetadata_returns_metadata_which_does_not_match_a_criterion_with_no_parameters()
        {
            // Arrange
            var criterion = Criterion.FromElementAndPredicateFunctionWithConstantValues("sprint", "isanyof");
            var sut       = IsInSprintConversionStrategy.GetMetadata();

            // Act
            var result = sut.CanConvert(criterion);

            // Assert
            Assert.That(result, Is.False);
        }
Example #4
0
        public void GetMetadata_returns_metadata_which_matches_a_criterion_for_sprint_isanyof_some_parameters()
        {
            // Arrange
            var criterion = Criterion.FromElementAndPredicateFunctionWithConstantValues("sprint", "isanyof", "one", "two");
            var sut       = IsInSprintConversionStrategy.GetMetadata();

            // Act
            var result = sut.CanConvert(criterion);

            // Assert
            Assert.That(result, Is.True);
        }