private MethodDeclarationSyntax ProduceTestMethodForExceptionCluster( TestCaseExceptionEquivalenceCluster cluster, int clustersCount, TestMethodNamer testMethodNamer) { var testCasesToRemain = cluster.EquivalentItems.Select(i => i.AttributeNode).ToArray(); var exceptionExpectancy = cluster.EquivalentItems.First(); var clusterMethod = _method.WithoutExceptionExpectancyInAttributes(testCasesToRemain) .WithBody(CreateAssertedBlock(exceptionExpectancy)).WithTrailingTrivia(CreateClusterMethodTrailingTrivia(cluster)) .WithIdentifier(testMethodNamer.CreateName(exceptionExpectancy, clustersCount)); return(clusterMethod); }
private MethodDeclarationSyntax ProduceTestMethodForTestCaseWithExpectedExceptionEquivalence( ExpectedExceptionTestCaseEquivalence equivalence, int equivalenceCount, TestMethodNamer testMethodNamer) { var testCasesToRemain = equivalence.EquivalentItems.Select(i => i.AttributeNode).ToArray(); var exceptionExpectancy = equivalence.EquivalentItems.First(); var clusterMethod = methodToBeFixed.WithoutExceptionExpectancyInAttributes(testCasesToRemain) .WithBody(CreateAssertedBlock(exceptionExpectancy)).WithTrailingTrivia(CreateClusterMethodTrailingTrivia(equivalence)) .WithIdentifier(testMethodNamer.CreateName(exceptionExpectancy, equivalenceCount)); return(clusterMethod); }