示例#1
0
        public void MutantFilter_ShouldSkipMutationsForExcludedMutatorType(Mutator excludedMutation, bool skipped)
        {
            // Arrange
            var mutant = new Mutant
            {
                Mutation = new Mutation
                {
                    Type = Mutator.Arithmetic,
                }
            };

            var sut = new IgnoreMutationMutantFilter();

            var options = new StrykerOptions
            {
                ExcludedMutations = new[] { excludedMutation }
            };

            // Act
            var filteredMutants = sut.FilterMutants(
                new[] { mutant },
                null,
                options);

            // Assert
            if (skipped)
            {
                filteredMutants.ShouldNotContain(mutant);
            }
            else
            {
                filteredMutants.ShouldContain(mutant);
            }
        }
示例#2
0
        public static void ShouldHaveName()
        {
            var target = new IgnoreMutationMutantFilter() as IMutantFilter;

            target.DisplayName.ShouldBe("mutation type filter");
        }