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

            var sut = new ExcludeMutationMutantFilter();

            // Act
            var filteredMutants = sut.FilterMutants(
                new[] { mutant },
                null,
                new StrykerOptions(excludedMutations: new[] { excludedMutator.ToString() }));

            // Assert
            if (skipped)
            {
                filteredMutants.ShouldNotContain(mutant);
            }
            else
            {
                filteredMutants.ShouldContain(mutant);
            }
        }