From 6e7347124c13b4e79de8aa47d015a4a6110fcaea Mon Sep 17 00:00:00 2001 From: Christian Soltenborn Date: Thu, 28 Jun 2018 18:55:10 +0200 Subject: [PATCH] refactoring --- .../Core.Tests/TestCases/TestCaseResolverTests.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/GoogleTestAdapter/Core.Tests/TestCases/TestCaseResolverTests.cs b/GoogleTestAdapter/Core.Tests/TestCases/TestCaseResolverTests.cs index 18e555c97..5e6cc7624 100644 --- a/GoogleTestAdapter/Core.Tests/TestCases/TestCaseResolverTests.cs +++ b/GoogleTestAdapter/Core.Tests/TestCases/TestCaseResolverTests.cs @@ -65,17 +65,19 @@ public void FindTestCaseLocation_Namespace_Anon_Named_LocationIsFound() private void AssertCorrectTestLocationIsFound(string suite, uint line) { + var descriptor = new TestCaseDescriptor( + suite, + "Test", + $"{suite}.Test", + $"{suite}.Test", + TestCaseDescriptor.TestTypes.Simple); + var signatures = new MethodSignatureCreator().GetTestMethodSignatures(descriptor); var resolver = new TestCaseResolver(TestResources.Tests_ReleaseX64, "", "".Yield(), new DefaultDiaResolverFactory(), true, _fakeLogger); - var signatureCreator = new MethodSignatureCreator(); - var descriptor = new TestCaseDescriptor(suite, "Test", $"{suite}.Test", $"{suite}.Test", - TestCaseDescriptor.TestTypes.Simple); - var signatures = signatureCreator.GetTestMethodSignatures(descriptor); var testCaseLocation = resolver.FindTestCaseLocation(signatures.ToList()); _fakeLogger.Errors.Should().BeEmpty(); - testCaseLocation.Should().NotBeNull(); testCaseLocation.Sourcefile.Should().EndWithEquivalent(@"sampletests\tests\namespacetests.cpp"); testCaseLocation.Line.Should().Be(line);