diff --git a/Source/Moq.Analyzers.Test/AbstractClassTests.ShouldPassIfGoodParametersAndFailOnTypeMismatch.verified.txt b/Source/Moq.Analyzers.Test/AbstractClassTests.ShouldPassIfGoodParametersAndFailOnTypeMismatch.verified.txt index c98b4132..a91dc11a 100644 --- a/Source/Moq.Analyzers.Test/AbstractClassTests.ShouldPassIfGoodParametersAndFailOnTypeMismatch.verified.txt +++ b/Source/Moq.Analyzers.Test/AbstractClassTests.ShouldPassIfGoodParametersAndFailOnTypeMismatch.verified.txt @@ -1,6 +1,6 @@ Diagnostic 1 Id: Moq1002 - Location: SourceFile(Test1.cs[247..253)) + Location: SourceFile(Test1.cs[223..229)) Highlight: ("42") Lines: var mock = new Mock("42"); Severity: Warning @@ -8,7 +8,7 @@ Diagnostic 2 Id: Moq1002 - Location: SourceFile(Test1.cs[420..430)) + Location: SourceFile(Test1.cs[388..398)) Highlight: ("42", 42) Lines: var mock1 = new Mock("42", 42); Severity: Warning @@ -16,7 +16,7 @@ Diagnostic 2 Diagnostic 3 Id: Moq1002 - Location: SourceFile(Test1.cs[559..563)) + Location: SourceFile(Test1.cs[519..523)) Highlight: (42) Lines: var mock2 = new Mock(42); Severity: Warning @@ -24,7 +24,7 @@ Diagnostic 3 Diagnostic 4 Id: Moq1002 - Location: SourceFile(Test1.cs[780..786)) + Location: SourceFile(Test1.cs[720..726)) Highlight: ("42") Lines: var mock = new Mock>("42"); Severity: Warning @@ -32,7 +32,7 @@ Diagnostic 4 Diagnostic 5 Id: Moq1002 - Location: SourceFile(Test1.cs[968..978)) + Location: SourceFile(Test1.cs[900..910)) Highlight: ("42", 42) Lines: var mock1 = new Mock>("42", 42); Severity: Warning @@ -40,7 +40,7 @@ Diagnostic 5 Diagnostic 6 Id: Moq1002 - Location: SourceFile(Test1.cs[1122..1126)) + Location: SourceFile(Test1.cs[1046..1050)) Highlight: (42) Lines: var mock2 = new Mock>(42); Severity: Warning diff --git a/Source/Moq.Analyzers.Test/AsAcceptOnlyInterfaceAnalyzerTests.ShouldPassIfGoodParameters.verified.txt b/Source/Moq.Analyzers.Test/AsAcceptOnlyInterfaceAnalyzerTests.ShouldPassIfGoodParameters.verified.txt index 9c8edf7a..b61e0229 100644 --- a/Source/Moq.Analyzers.Test/AsAcceptOnlyInterfaceAnalyzerTests.ShouldPassIfGoodParameters.verified.txt +++ b/Source/Moq.Analyzers.Test/AsAcceptOnlyInterfaceAnalyzerTests.ShouldPassIfGoodParameters.verified.txt @@ -1,6 +1,6 @@ Diagnostic 1 Id: Moq1300 - Location: SourceFile(Test0.cs[1366..1381)) + Location: SourceFile(Test0.cs[1212..1227)) Highlight: BaseSampleClass Lines: mock.As(); Severity: Error @@ -8,7 +8,7 @@ Diagnostic 2 Id: Moq1300 - Location: SourceFile(Test0.cs[1531..1541)) + Location: SourceFile(Test0.cs[1357..1367)) Highlight: OtherClass Lines: mock.As(); Severity: Error diff --git a/Source/Moq.Analyzers.Test/CallbackSignatureShouldMatchMockedMethodAnalyzerTests.ShouldPassIfGoodParameters.verified.txt b/Source/Moq.Analyzers.Test/CallbackSignatureShouldMatchMockedMethodAnalyzerTests.ShouldPassIfGoodParameters.verified.txt index aa29e21a..3de4ad67 100644 --- a/Source/Moq.Analyzers.Test/CallbackSignatureShouldMatchMockedMethodAnalyzerTests.ShouldPassIfGoodParameters.verified.txt +++ b/Source/Moq.Analyzers.Test/CallbackSignatureShouldMatchMockedMethodAnalyzerTests.ShouldPassIfGoodParameters.verified.txt @@ -1,6 +1,6 @@ Diagnostic 1 Id: Moq1100 - Location: SourceFile(Test0.cs[1079..1086)) + Location: SourceFile(Test0.cs[1030..1037)) Highlight: (int i) Lines: mock.Setup(x => x.Do(It.IsAny())).Callback((int i) => { }); Severity: Warning @@ -8,7 +8,7 @@ Diagnostic 2 Id: Moq1100 - Location: SourceFile(Test0.cs[1159..1181)) + Location: SourceFile(Test0.cs[1106..1128)) Highlight: (string s1, string s2) Lines: mock.Setup(x => x.Do(It.IsAny())).Callback((string s1, string s2) => { }); Severity: Warning @@ -16,7 +16,7 @@ Diagnostic 2 Diagnostic 3 Id: Moq1100 - Location: SourceFile(Test0.cs[1293..1312)) + Location: SourceFile(Test0.cs[1236..1255)) Highlight: (string s1, int i1) Lines: mock.Setup(x => x.Do(It.IsAny(), It.IsAny(), It.IsAny())).Callback((string s1, int i1) => { }); Severity: Warning @@ -24,7 +24,7 @@ Diagnostic 3 Diagnostic 4 Id: Moq1100 - Location: SourceFile(Test0.cs[1391..1398)) + Location: SourceFile(Test0.cs[1330..1337)) Highlight: (int i) Lines: mock.Setup(x => x.Do(It.IsAny>())).Callback((int i) => { }); Severity: Warning diff --git a/Source/Moq.Analyzers.Test/CallbackSignatureShouldMatchMockedMethodCodeFixTests.ShouldSuggestQuickFixIfBadParameters.verified.txt b/Source/Moq.Analyzers.Test/CallbackSignatureShouldMatchMockedMethodCodeFixTests.ShouldSuggestQuickFixIfBadParameters.verified.txt index 34390544..657e2682 100644 --- a/Source/Moq.Analyzers.Test/CallbackSignatureShouldMatchMockedMethodCodeFixTests.ShouldSuggestQuickFixIfBadParameters.verified.txt +++ b/Source/Moq.Analyzers.Test/CallbackSignatureShouldMatchMockedMethodCodeFixTests.ShouldSuggestQuickFixIfBadParameters.verified.txt @@ -12,58 +12,57 @@ using Moq; #pragma warning disable IDE0051 // Unused private member #pragma warning disable IDE0059 // Unnecessary value assignment #pragma warning disable IDE0060 // Unused parameter -namespace CallbackSignatureShouldMatchMockedMethod +namespace CallbackSignatureShouldMatchMockedMethod; + +internal interface IFoo { - internal interface IFoo - { - int Do(string s); + int Do(string s); - int Do(int i, string s, DateTime dt); + int Do(int i, string s, DateTime dt); - int Do(List l); - } + int Do(List l); +} - internal class MyUnitTests +internal class MyUnitTests +{ + private void TestBadCallbacks() { - private void TestBadCallbacks() - { - var mock = new Mock(); - mock.Setup(x => x.Do(It.IsAny())).Callback((string s) => { }); - mock.Setup(x => x.Do(It.IsAny())).Callback((string s) => { }); - mock.Setup(x => x.Do(It.IsAny(), It.IsAny(), It.IsAny())).Callback((int i, string s, DateTime dt) => { }); - mock.Setup(x => x.Do(It.IsAny>())).Callback((List l) => { }); - } + var mock = new Mock(); + mock.Setup(x => x.Do(It.IsAny())).Callback((string s) => { }); + mock.Setup(x => x.Do(It.IsAny())).Callback((string s) => { }); + mock.Setup(x => x.Do(It.IsAny(), It.IsAny(), It.IsAny())).Callback((int i, string s, DateTime dt) => { }); + mock.Setup(x => x.Do(It.IsAny>())).Callback((List l) => { }); + } - private void TestGoodSetupAndParameterlessCallback() - { - var mock = new Mock(); - mock.Setup(x => x.Do(It.IsAny())).Callback(() => { }); - mock.Setup(x => x.Do(It.IsAny(), It.IsAny(), It.IsAny())).Callback(() => { }); - mock.Setup(x => x.Do(It.IsAny>())).Callback(() => { }); - } + private void TestGoodSetupAndParameterlessCallback() + { + var mock = new Mock(); + mock.Setup(x => x.Do(It.IsAny())).Callback(() => { }); + mock.Setup(x => x.Do(It.IsAny(), It.IsAny(), It.IsAny())).Callback(() => { }); + mock.Setup(x => x.Do(It.IsAny>())).Callback(() => { }); + } - private void TestGoodSetupAndCallback() - { - var mock = new Mock(); - mock.Setup(x => x.Do(It.IsAny())).Callback((string s) => { }); - mock.Setup(x => x.Do(It.IsAny(), It.IsAny(), It.IsAny())).Callback((int i, string s, DateTime dt) => { }); - mock.Setup(x => x.Do(It.IsAny>())).Callback((List l) => { }); - } + private void TestGoodSetupAndCallback() + { + var mock = new Mock(); + mock.Setup(x => x.Do(It.IsAny())).Callback((string s) => { }); + mock.Setup(x => x.Do(It.IsAny(), It.IsAny(), It.IsAny())).Callback((int i, string s, DateTime dt) => { }); + mock.Setup(x => x.Do(It.IsAny>())).Callback((List l) => { }); + } - private void TestGoodSetupAndReturnsAndCallback() - { - var mock = new Mock(); - mock.Setup(x => x.Do(It.IsAny())).Returns(0).Callback((string s) => { }); - mock.Setup(x => x.Do(It.IsAny(), It.IsAny(), It.IsAny())).Returns(0).Callback((int i, string s, DateTime dt) => { }); - mock.Setup(x => x.Do(It.IsAny>())).Returns(0).Callback((List l) => { }); - } + private void TestGoodSetupAndReturnsAndCallback() + { + var mock = new Mock(); + mock.Setup(x => x.Do(It.IsAny())).Returns(0).Callback((string s) => { }); + mock.Setup(x => x.Do(It.IsAny(), It.IsAny(), It.IsAny())).Returns(0).Callback((int i, string s, DateTime dt) => { }); + mock.Setup(x => x.Do(It.IsAny>())).Returns(0).Callback((List l) => { }); + } - private void MyGoodSetupAndReturns() - { - var mock = new Mock(); - mock.Setup(x => x.Do(It.IsAny())).Returns((string s) => { return 0; }); - mock.Setup(x => x.Do(It.IsAny(), It.IsAny(), It.IsAny())).Returns((int i, string s, DateTime dt) => { return 0; }); - mock.Setup(x => x.Do(It.IsAny>())).Returns((List l) => { return 0; }); - } + private void MyGoodSetupAndReturns() + { + var mock = new Mock(); + mock.Setup(x => x.Do(It.IsAny())).Returns((string s) => { return 0; }); + mock.Setup(x => x.Do(It.IsAny(), It.IsAny(), It.IsAny())).Returns((int i, string s, DateTime dt) => { return 0; }); + mock.Setup(x => x.Do(It.IsAny>())).Returns((List l) => { return 0; }); } } diff --git a/Source/Moq.Analyzers.Test/ConstructorArgumentsShouldMatchAnalyzerTests.ShouldFailIfClassParametersDoNotMatch.verified.txt b/Source/Moq.Analyzers.Test/ConstructorArgumentsShouldMatchAnalyzerTests.ShouldFailIfClassParametersDoNotMatch.verified.txt index 34ec1d67..12a11093 100644 --- a/Source/Moq.Analyzers.Test/ConstructorArgumentsShouldMatchAnalyzerTests.ShouldFailIfClassParametersDoNotMatch.verified.txt +++ b/Source/Moq.Analyzers.Test/ConstructorArgumentsShouldMatchAnalyzerTests.ShouldFailIfClassParametersDoNotMatch.verified.txt @@ -1,6 +1,6 @@ Diagnostic 1 Id: Moq1002 - Location: SourceFile(Test0.cs[1216..1225)) + Location: SourceFile(Test0.cs[1167..1176)) Highlight: (1, true) Lines: var mock1 = new Moq.Mock(1, true); Severity: Warning @@ -8,7 +8,7 @@ Diagnostic 2 Id: Moq1002 - Location: SourceFile(Test0.cs[1296..1305)) + Location: SourceFile(Test0.cs[1243..1252)) Highlight: (2, true) Lines: var mock2 = new Mock(2, true); Severity: Warning @@ -16,7 +16,7 @@ Diagnostic 2 Diagnostic 3 Id: Moq1002 - Location: SourceFile(Test0.cs[1376..1384)) + Location: SourceFile(Test0.cs[1319..1327)) Highlight: ("1", 3) Lines: var mock3 = new Mock("1", 3); Severity: Warning @@ -24,7 +24,7 @@ Diagnostic 3 Diagnostic 4 Id: Moq1002 - Location: SourceFile(Test0.cs[1455..1478)) + Location: SourceFile(Test0.cs[1394..1417)) Highlight: (new int[] { 1, 2, 3 }) Lines: var mock4 = new Mock(new int[] { 1, 2, 3 }); Severity: Warning @@ -32,7 +32,7 @@ Diagnostic 4 Diagnostic 5 Id: Moq1002 - Location: SourceFile(Test0.cs[1570..1600)) + Location: SourceFile(Test0.cs[1493..1523)) Highlight: (MockBehavior.Strict, 4, true) Lines: var mock1 = new Mock(MockBehavior.Strict, 4, true); Severity: Warning @@ -40,7 +40,7 @@ Diagnostic 5 Diagnostic 6 Id: Moq1002 - Location: SourceFile(Test0.cs[1675..1704)) + Location: SourceFile(Test0.cs[1594..1623)) Highlight: (MockBehavior.Loose, 5, true) Lines: var mock2 = new Moq.Mock(MockBehavior.Loose, 5, true); Severity: Warning @@ -48,7 +48,7 @@ Diagnostic 6 Diagnostic 7 Id: Moq1002 - Location: SourceFile(Test0.cs[1779..1807)) + Location: SourceFile(Test0.cs[1694..1722)) Highlight: (MockBehavior.Loose, "2", 6) Lines: var mock3 = new Moq.Mock(MockBehavior.Loose, "2", 6); Severity: Warning diff --git a/Source/Moq.Analyzers.Test/NoConstructorArgumentsForInterfaceMockAnalyzerTests.ShouldFailIfMockedInterfaceHasParameters.verified.txt b/Source/Moq.Analyzers.Test/NoConstructorArgumentsForInterfaceMockAnalyzerTests.ShouldFailIfMockedInterfaceHasParameters.verified.txt index 0ffe270b..db89c886 100644 --- a/Source/Moq.Analyzers.Test/NoConstructorArgumentsForInterfaceMockAnalyzerTests.ShouldFailIfMockedInterfaceHasParameters.verified.txt +++ b/Source/Moq.Analyzers.Test/NoConstructorArgumentsForInterfaceMockAnalyzerTests.ShouldFailIfMockedInterfaceHasParameters.verified.txt @@ -1,6 +1,6 @@ Diagnostic 1 Id: Moq1001 - Location: SourceFile(Test0.cs[831..841)) + Location: SourceFile(Test0.cs[794..804)) Highlight: (25, true) Lines: var mock1 = new Moq.Mock(25, true); Severity: Warning @@ -8,7 +8,7 @@ Diagnostic 2 Id: Moq1001 - Location: SourceFile(Test0.cs[887..894)) + Location: SourceFile(Test0.cs[846..853)) Highlight: ("123") Lines: var mock2 = new Mock("123"); Severity: Warning @@ -16,7 +16,7 @@ Diagnostic 2 Diagnostic 3 Id: Moq1001 - Location: SourceFile(Test0.cs[981..991)) + Location: SourceFile(Test0.cs[936..946)) Highlight: (25, true) Lines: var mock3 = new Mock(25, true); Severity: Warning @@ -24,7 +24,7 @@ Diagnostic 3 Diagnostic 4 Id: Moq1001 - Location: SourceFile(Test0.cs[1082..1089)) + Location: SourceFile(Test0.cs[1033..1040)) Highlight: ("123") Lines: var mock4 = new Moq.Mock("123"); Severity: Warning @@ -32,7 +32,7 @@ Diagnostic 4 Diagnostic 5 Id: Moq1001 - Location: SourceFile(Test0.cs[1192..1225)) + Location: SourceFile(Test0.cs[1127..1160)) Highlight: (Moq.MockBehavior.Default, "123") Lines: var mock1 = new Moq.Mock(Moq.MockBehavior.Default, "123"); Severity: Warning @@ -40,7 +40,7 @@ Diagnostic 5 Diagnostic 6 Id: Moq1001 - Location: SourceFile(Test0.cs[1271..1302)) + Location: SourceFile(Test0.cs[1202..1233)) Highlight: (MockBehavior.Strict, 25, true) Lines: var mock2 = new Mock(MockBehavior.Strict, 25, true); Severity: Warning @@ -48,7 +48,7 @@ Diagnostic 6 Diagnostic 7 Id: Moq1001 - Location: SourceFile(Test0.cs[1389..1422)) + Location: SourceFile(Test0.cs[1316..1349)) Highlight: (Moq.MockBehavior.Default, "123") Lines: var mock3 = new Mock(Moq.MockBehavior.Default, "123"); Severity: Warning @@ -56,7 +56,7 @@ Diagnostic 7 Diagnostic 8 Id: Moq1001 - Location: SourceFile(Test0.cs[1513..1543)) + Location: SourceFile(Test0.cs[1436..1466)) Highlight: (MockBehavior.Loose, 25, true) Lines: var mock4 = new Moq.Mock(MockBehavior.Loose, 25, true); Severity: Warning diff --git a/Source/Moq.Analyzers.Test/NoConstructorArgumentsForInterfaceMockAnalyzerTests.ShouldPassIfCustomMockClassIsUsed.verified.txt b/Source/Moq.Analyzers.Test/NoConstructorArgumentsForInterfaceMockAnalyzerTests.ShouldPassIfCustomMockClassIsUsed.verified.txt index 1216d0c9..657c227b 100644 --- a/Source/Moq.Analyzers.Test/NoConstructorArgumentsForInterfaceMockAnalyzerTests.ShouldPassIfCustomMockClassIsUsed.verified.txt +++ b/Source/Moq.Analyzers.Test/NoConstructorArgumentsForInterfaceMockAnalyzerTests.ShouldPassIfCustomMockClassIsUsed.verified.txt @@ -1,6 +1,6 @@ Diagnostic 1 Id: Moq1001 - Location: SourceFile(Test0.cs[1180..1189)) + Location: SourceFile(Test0.cs[1088..1097)) Highlight: (1, true) Lines: var mock1 = new Moq.Mock(1, true); Severity: Warning @@ -8,7 +8,7 @@ Diagnostic 2 Id: Moq1001 - Location: SourceFile(Test0.cs[1280..1285)) + Location: SourceFile(Test0.cs[1184..1189)) Highlight: ("2") Lines: var mock2 = new Moq.Mock("2"); Severity: Warning @@ -16,7 +16,7 @@ Diagnostic 2 Diagnostic 3 Id: Moq1001 - Location: SourceFile(Test0.cs[1335..1366)) + Location: SourceFile(Test0.cs[1235..1266)) Highlight: (Moq.MockBehavior.Default, "3") Lines: var mock3 = new Moq.Mock(Moq.MockBehavior.Default, "3"); Severity: Warning @@ -24,7 +24,7 @@ Diagnostic 3 Diagnostic 4 Id: Moq1001 - Location: SourceFile(Test0.cs[1457..1486)) + Location: SourceFile(Test0.cs[1353..1382)) Highlight: (MockBehavior.Loose, 4, true) Lines: var mock4 = new Moq.Mock(MockBehavior.Loose, 4, true); Severity: Warning @@ -32,7 +32,7 @@ Diagnostic 4 Diagnostic 5 Id: Moq1001 - Location: SourceFile(Test0.cs[1536..1558)) + Location: SourceFile(Test0.cs[1428..1450)) Highlight: (MockBehavior.Default) Lines: var mock5 = new Moq.Mock(MockBehavior.Default); Severity: Warning @@ -40,7 +40,7 @@ Diagnostic 5 Diagnostic 6 Id: Moq1001 - Location: SourceFile(Test0.cs[1649..1671)) + Location: SourceFile(Test0.cs[1537..1559)) Highlight: (MockBehavior.Default) Lines: var mock6 = new Moq.Mock(MockBehavior.Default); Severity: Warning diff --git a/Source/Moq.Analyzers.Test/NoMethodsInPropertySetupAnalyzerTests.Test.verified.txt b/Source/Moq.Analyzers.Test/NoMethodsInPropertySetupAnalyzerTests.Test.verified.txt index f9336185..d5f86c56 100644 --- a/Source/Moq.Analyzers.Test/NoMethodsInPropertySetupAnalyzerTests.Test.verified.txt +++ b/Source/Moq.Analyzers.Test/NoMethodsInPropertySetupAnalyzerTests.Test.verified.txt @@ -1,6 +1,6 @@ Diagnostic 1 Id: Moq1101 - Location: SourceFile(Test0.cs[925..935)) + Location: SourceFile(Test0.cs[872..882)) Highlight: x.Method() Lines: mock.SetupGet(x => x.Method()); Severity: Warning @@ -8,7 +8,7 @@ Diagnostic 2 Id: Moq1101 - Location: SourceFile(Test0.cs[969..979)) + Location: SourceFile(Test0.cs[912..922)) Highlight: x.Method() Lines: mock.SetupSet(x => x.Method()); Severity: Warning diff --git a/Source/Moq.Analyzers.Test/NoSealedClassMocksAnalyzerTests.ShouldFailIfFileIsSealed.verified.txt b/Source/Moq.Analyzers.Test/NoSealedClassMocksAnalyzerTests.ShouldFailIfFileIsSealed.verified.txt index b78b11d2..b9435c14 100644 --- a/Source/Moq.Analyzers.Test/NoSealedClassMocksAnalyzerTests.ShouldFailIfFileIsSealed.verified.txt +++ b/Source/Moq.Analyzers.Test/NoSealedClassMocksAnalyzerTests.ShouldFailIfFileIsSealed.verified.txt @@ -1,6 +1,6 @@ Diagnostic 1 Id: Moq1000 - Location: SourceFile(Test0.cs[822..831)) + Location: SourceFile(Test0.cs[785..794)) Highlight: FooSealed Lines: var mock1 = new Moq.Mock(); Severity: Warning @@ -8,7 +8,7 @@ Diagnostic 2 Id: Moq1000 - Location: SourceFile(Test0.cs[869..878)) + Location: SourceFile(Test0.cs[828..837)) Highlight: FooSealed Lines: var mock2 = new Mock(); Severity: Warning @@ -16,7 +16,7 @@ Diagnostic 2 Diagnostic 3 Id: Moq1000 - Location: SourceFile(Test0.cs[916..944)) + Location: SourceFile(Test0.cs[871..899)) Highlight: NoSealedClassMocks.FooSealed Lines: var mock3 = new Mock(); Severity: Warning @@ -24,7 +24,7 @@ Diagnostic 3 Diagnostic 4 Id: Moq1000 - Location: SourceFile(Test0.cs[986..1014)) + Location: SourceFile(Test0.cs[937..965)) Highlight: NoSealedClassMocks.FooSealed Lines: var mock4 = new Moq.Mock(); Severity: Warning diff --git a/Source/Moq.Analyzers.Test/SetupShouldBeUsedOnlyForOverridableMembersAnalyzerTests.ShouldPassIfGoodParameters.verified.txt b/Source/Moq.Analyzers.Test/SetupShouldBeUsedOnlyForOverridableMembersAnalyzerTests.ShouldPassIfGoodParameters.verified.txt index a38d8610..1a68dc7a 100644 --- a/Source/Moq.Analyzers.Test/SetupShouldBeUsedOnlyForOverridableMembersAnalyzerTests.ShouldPassIfGoodParameters.verified.txt +++ b/Source/Moq.Analyzers.Test/SetupShouldBeUsedOnlyForOverridableMembersAnalyzerTests.ShouldPassIfGoodParameters.verified.txt @@ -1,6 +1,6 @@ Diagnostic 1 Id: Moq1200 - Location: SourceFile(Test0.cs[2060..2073)) + Location: SourceFile(Test0.cs[1852..1865)) Highlight: x.Calculate() Lines: mock.Setup(x => x.Calculate()); Severity: Error @@ -8,7 +8,7 @@ Diagnostic 2 Id: Moq1200 - Location: SourceFile(Test0.cs[2224..2286)) + Location: SourceFile(Test0.cs[1996..2058)) Highlight: x.Calculate(It.IsAny(), It.IsAny(), It.IsAny()) Lines: mock.Setup(x => x.Calculate(It.IsAny(), It.IsAny(), It.IsAny())); Severity: Error @@ -16,7 +16,7 @@ Diagnostic 2 Diagnostic 3 Id: Moq1200 - Location: SourceFile(Test0.cs[2443..2453)) + Location: SourceFile(Test0.cs[2195..2205)) Highlight: x.Property Lines: mock.Setup(x => x.Property); Severity: Error diff --git a/Source/Moq.Analyzers.Test/SetupShouldNotIncludeAsyncResultAnalyzerTests.ShouldPassIfSetupProperly.verified.txt b/Source/Moq.Analyzers.Test/SetupShouldNotIncludeAsyncResultAnalyzerTests.ShouldPassIfSetupProperly.verified.txt index f32fc8a6..8b863fb7 100644 --- a/Source/Moq.Analyzers.Test/SetupShouldNotIncludeAsyncResultAnalyzerTests.ShouldPassIfSetupProperly.verified.txt +++ b/Source/Moq.Analyzers.Test/SetupShouldNotIncludeAsyncResultAnalyzerTests.ShouldPassIfSetupProperly.verified.txt @@ -1,6 +1,6 @@ Diagnostic 1 Id: Moq1201 - Location: SourceFile(Test0.cs[838..879)) + Location: SourceFile(Test0.cs[773..814)) Highlight: c.GenericAsyncWithConcreteReturn().Result Lines: mock.Setup(c => c.GenericAsyncWithConcreteReturn().Result); Severity: Error