From 17b89e5004ad41bcc077130e2eb1f33bef2215dc Mon Sep 17 00:00:00 2001 From: Matt Kotsenas Date: Sun, 9 Jun 2024 23:14:58 -0700 Subject: [PATCH] Code review fixes --- ...backSignatureShouldMatchMockedMethodCodeFixTests.cs | 4 ++-- ...ouldBeUsedOnlyForOverridableMembersAnalyzerTests.cs | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Source/Moq.Analyzers.Test/CallbackSignatureShouldMatchMockedMethodCodeFixTests.cs b/Source/Moq.Analyzers.Test/CallbackSignatureShouldMatchMockedMethodCodeFixTests.cs index e7e460b6..80e1292a 100644 --- a/Source/Moq.Analyzers.Test/CallbackSignatureShouldMatchMockedMethodCodeFixTests.cs +++ b/Source/Moq.Analyzers.Test/CallbackSignatureShouldMatchMockedMethodCodeFixTests.cs @@ -139,9 +139,9 @@ internal interface IFoo int Do(List l); } - internal class MyUnitTests + internal class UnitTest { - private void MyGoodSetupAndReturns() + private void Test() { {{mock}} } diff --git a/Source/Moq.Analyzers.Test/SetupShouldBeUsedOnlyForOverridableMembersAnalyzerTests.cs b/Source/Moq.Analyzers.Test/SetupShouldBeUsedOnlyForOverridableMembersAnalyzerTests.cs index 8afac6bd..8d78856f 100644 --- a/Source/Moq.Analyzers.Test/SetupShouldBeUsedOnlyForOverridableMembersAnalyzerTests.cs +++ b/Source/Moq.Analyzers.Test/SetupShouldBeUsedOnlyForOverridableMembersAnalyzerTests.cs @@ -30,27 +30,21 @@ await Verifier.VerifyAnalyzerAsync( public interface ISampleInterface { int Calculate(int a, int b); - int TestProperty { get; set; } } - + public abstract class BaseSampleClass { public int Calculate() => 0; - public abstract int Calculate(int a, int b); - public abstract int Calculate(int a, int b, int c); } - + public class SampleClass : BaseSampleClass { public override int Calculate(int a, int b) => 0; - public sealed override int Calculate(int a, int b, int c) => 0; - public virtual int DoSth() => 0; - public int Property { get; set; } }