コード例 #1
0
        public void ShouldMutate(SyntaxKind original, SyntaxKind expected)
        {
            var target       = new PostfixUnaryMutator();
            var originalNode = SyntaxFactory.PostfixUnaryExpression(original,
                                                                    SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(1)));

            var result = target.ApplyMutations(originalNode).ToList();

            result.ShouldHaveSingleItem();
            var mutation = result.First();

            mutation.ReplacementNode.IsKind(expected).ShouldBeTrue();
            mutation.Type.ShouldBe(MutatorType.Update);
        }
コード例 #2
0
        public void ShouldBeMutationlevelStandard()
        {
            var target = new PostfixUnaryMutator();

            target.MutationLevel.ShouldBe(MutationLevel.Standard);
        }