From 9f7a90c6213b01e52cfe0d8d5f4ee7c3265cff2f Mon Sep 17 00:00:00 2001 From: Meir Blachman Date: Mon, 3 Jun 2024 11:51:58 +0300 Subject: [PATCH] docs: rename mstest function docs (#367) --- docs/MsTestAnalyzer.md | 24 +++++------ .../MsTestAnalyzerTests.cs | 40 +++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/MsTestAnalyzer.md b/docs/MsTestAnalyzer.md index f5c5b16d..cf058f39 100644 --- a/docs/MsTestAnalyzer.md +++ b/docs/MsTestAnalyzer.md @@ -4,12 +4,12 @@ This is a generated file, please edit src\FluentAssertions.Analyzers.FluentAsser # MsTest Analyzer Docs -- [BooleanAssertIsTrue](#scenario-booleanassertistrue) - `flag.Should().BeTrue();` -- [BooleanAssertIsFalse](#scenario-booleanassertisfalse) - `flag.Should().BeFalse();` -- [ObjectAssertIsNull](#scenario-objectassertisnull) - `obj.Should().BeNull();` -- [ObjectAssertIsNotNull](#scenario-objectassertisnotnull) - `obj.Should().NotBeNull();` -- [ReferenceTypeAssertIsInstanceOfType](#scenario-referencetypeassertisinstanceoftype) - `obj.Should().BeOfType>();` -- [ReferenceTypeAssertIsNotInstanceOfType](#scenario-referencetypeassertisnotinstanceoftype) - `obj.Should().NotBeOfType>();` +- [AssertIsTrue](#scenario-assertistrue) - `flag.Should().BeTrue();` +- [AssertIsFalse](#scenario-assertisfalse) - `flag.Should().BeFalse();` +- [AssertIsNull](#scenario-assertisnull) - `obj.Should().BeNull();` +- [AssertIsNotNull](#scenario-assertisnotnull) - `obj.Should().NotBeNull();` +- [AssertIsInstanceOfType](#scenario-assertisinstanceoftype) - `obj.Should().BeOfType>();` +- [AssertIsNotInstanceOfType](#scenario-assertisnotinstanceoftype) - `obj.Should().NotBeOfType>();` - [AssertObjectAreEqual](#scenario-assertobjectareequal) - `obj1.Should().Be(obj2);` - [AssertOptionalIntegerAreEqual](#scenario-assertoptionalintegerareequal) - `number1.Should().Be(number2);` - [AssertOptionalIntegerAndNullAreEqual](#scenario-assertoptionalintegerandnullareequal) - `number.Should().BeNull();` @@ -47,7 +47,7 @@ This is a generated file, please edit src\FluentAssertions.Analyzers.FluentAsser ## Scenarios -### scenario: BooleanAssertIsTrue +### scenario: AssertIsTrue ```cs // arrange @@ -72,7 +72,7 @@ Assert.IsTrue(flag); /* fail message: Assert.IsTrue failed. */ flag.Should().BeTrue(); /* fail message: Expected flag to be true, but found False. */ ``` -### scenario: BooleanAssertIsFalse +### scenario: AssertIsFalse ```cs // arrange @@ -97,7 +97,7 @@ Assert.IsFalse(flag); /* fail message: Assert.IsFalse failed. */ flag.Should().BeFalse(); /* fail message: Expected flag to be false, but found True. */ ``` -### scenario: ObjectAssertIsNull +### scenario: AssertIsNull ```cs // arrange @@ -122,7 +122,7 @@ Assert.IsNull(obj); /* fail message: Assert.IsNull failed. */ obj.Should().BeNull(); /* fail message: Expected obj to be , but found "foo". */ ``` -### scenario: ObjectAssertIsNotNull +### scenario: AssertIsNotNull ```cs // arrange @@ -147,7 +147,7 @@ Assert.IsNotNull(obj); /* fail message: Assert.IsNotNull failed. */ obj.Should().NotBeNull(); /* fail message: Expected obj not to be . */ ``` -### scenario: ReferenceTypeAssertIsInstanceOfType +### scenario: AssertIsInstanceOfType ```cs // arrange @@ -174,7 +174,7 @@ Assert.IsInstanceOfType>(obj); /* fail message: Assert.IsInstanceOf obj.Should().BeOfType>(); /* fail message: Expected type to be System.Collections.Generic.List`1[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], but found System.Collections.Generic.List`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]. */ ``` -### scenario: ReferenceTypeAssertIsNotInstanceOfType +### scenario: AssertIsNotInstanceOfType ```cs // arrange diff --git a/src/FluentAssertions.Analyzers.FluentAssertionAnalyzerDocs/MsTestAnalyzerTests.cs b/src/FluentAssertions.Analyzers.FluentAssertionAnalyzerDocs/MsTestAnalyzerTests.cs index 2cdebc6e..23619ace 100644 --- a/src/FluentAssertions.Analyzers.FluentAssertionAnalyzerDocs/MsTestAnalyzerTests.cs +++ b/src/FluentAssertions.Analyzers.FluentAssertionAnalyzerDocs/MsTestAnalyzerTests.cs @@ -12,7 +12,7 @@ namespace FluentAssertions.Analyzers.FluentAssertionAnalyzerDocs; public class MsTestAnalyzerTests { [TestMethod] - public void BooleanAssertIsTrue() + public void AssertIsTrue() { // arrange var flag = true; @@ -25,7 +25,7 @@ public void BooleanAssertIsTrue() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void BooleanAssertIsTrue_Failure_OldAssertion() + public void AssertIsTrue_Failure_OldAssertion() { // arrange var flag = false; @@ -35,7 +35,7 @@ public void BooleanAssertIsTrue_Failure_OldAssertion() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void BooleanAssertIsTrue_Failure_NewAssertion() + public void AssertIsTrue_Failure_NewAssertion() { // arrange var flag = false; @@ -45,7 +45,7 @@ public void BooleanAssertIsTrue_Failure_NewAssertion() } [TestMethod] - public void BooleanAssertIsFalse() + public void AssertIsFalse() { // arrange var flag = false; @@ -58,7 +58,7 @@ public void BooleanAssertIsFalse() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void BooleanAssertIsFalse_Failure_OldAssertion() + public void AssertIsFalse_Failure_OldAssertion() { // arrange var flag = true; @@ -68,7 +68,7 @@ public void BooleanAssertIsFalse_Failure_OldAssertion() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void BooleanAssertIsFalse_Failure_NewAssertion() + public void AssertIsFalse_Failure_NewAssertion() { // arrange var flag = true; @@ -78,7 +78,7 @@ public void BooleanAssertIsFalse_Failure_NewAssertion() } [TestMethod] - public void ObjectAssertIsNull() + public void AssertIsNull() { // arrange object obj = null; @@ -91,7 +91,7 @@ public void ObjectAssertIsNull() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void ObjectAssertIsNull_Failure_OldAssertion() + public void AssertIsNull_Failure_OldAssertion() { // arrange var obj = "foo"; @@ -101,7 +101,7 @@ public void ObjectAssertIsNull_Failure_OldAssertion() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void ObjectAssertIsNull_Failure_NewAssertion() + public void AssertIsNull_Failure_NewAssertion() { // arrange var obj = "foo"; @@ -111,7 +111,7 @@ public void ObjectAssertIsNull_Failure_NewAssertion() } [TestMethod] - public void ObjectAssertIsNotNull() + public void AssertIsNotNull() { // arrange var obj = new object(); @@ -124,7 +124,7 @@ public void ObjectAssertIsNotNull() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void ObjectAssertIsNotNull_Failure_OldAssertion() + public void AssertIsNotNull_Failure_OldAssertion() { // arrange object obj = null; @@ -134,7 +134,7 @@ public void ObjectAssertIsNotNull_Failure_OldAssertion() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void ObjectAssertIsNotNull_Failure_NewAssertion() + public void AssertIsNotNull_Failure_NewAssertion() { // arrange object obj = null; @@ -144,7 +144,7 @@ public void ObjectAssertIsNotNull_Failure_NewAssertion() } [TestMethod] - public void ReferenceTypeAssertIsInstanceOfType() + public void AssertIsInstanceOfType() { // arrange var obj = new List(); @@ -158,7 +158,7 @@ public void ReferenceTypeAssertIsInstanceOfType() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void ReferenceTypeAssertIsInstanceOfType_Failure_OldAssertion_0() + public void AssertIsInstanceOfType_Failure_OldAssertion_0() { // arrange var obj = new List(); @@ -168,7 +168,7 @@ public void ReferenceTypeAssertIsInstanceOfType_Failure_OldAssertion_0() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void ReferenceTypeAssertIsInstanceOfType_Failure_OldAssertion_1() + public void AssertIsInstanceOfType_Failure_OldAssertion_1() { // arrange var obj = new List(); @@ -178,7 +178,7 @@ public void ReferenceTypeAssertIsInstanceOfType_Failure_OldAssertion_1() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void ReferenceTypeAssertIsInstanceOfType_Failure_NewAssertion() + public void AssertIsInstanceOfType_Failure_NewAssertion() { // arrange var obj = new List(); @@ -188,7 +188,7 @@ public void ReferenceTypeAssertIsInstanceOfType_Failure_NewAssertion() } [TestMethod] - public void ReferenceTypeAssertIsNotInstanceOfType() + public void AssertIsNotInstanceOfType() { // arrange var obj = new List(); @@ -202,7 +202,7 @@ public void ReferenceTypeAssertIsNotInstanceOfType() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void ReferenceTypeAssertIsNotInstanceOfType_Failure_OldAssertion_0() + public void AssertIsNotInstanceOfType_Failure_OldAssertion_0() { // arrange var obj = new List(); @@ -212,7 +212,7 @@ public void ReferenceTypeAssertIsNotInstanceOfType_Failure_OldAssertion_0() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void ReferenceTypeAssertIsNotInstanceOfType_Failure_OldAssertion_1() + public void AssertIsNotInstanceOfType_Failure_OldAssertion_1() { // arrange var obj = new List(); @@ -222,7 +222,7 @@ public void ReferenceTypeAssertIsNotInstanceOfType_Failure_OldAssertion_1() } [TestMethod, ExpectedException(typeof(AssertFailedException))] - public void ReferenceTypeAssertIsNotInstanceOfType_Failure_NewAssertion() + public void AssertIsNotInstanceOfType_Failure_NewAssertion() { // arrange var obj = new List();