From bb23570c8f43fbac3cf99dc8c258e15756ea8e9e Mon Sep 17 00:00:00 2001 From: Lukas Gasselsberger | alu-one Date: Mon, 25 Apr 2022 07:55:01 +0200 Subject: [PATCH] Fix codestyle issue `IDE0055` --- Src/FluentAssertions/Primitives/EnumAssertions.cs | 2 +- .../DataSetSpecs.cs | 2 +- .../DataTableSpecs.cs | 2 +- .../CollectionAssertionSpecs.Contain.cs | 2 +- .../Collections/CollectionAssertionSpecs.Equal.cs | 2 +- .../CollectionAssertionSpecs.HaveCount.cs | 2 +- .../CollectionAssertionSpecs.Satisfy.cs | 2 +- .../Primitives/DateTimeAssertionSpecs.cs | 12 ++++++------ .../Primitives/EnumAssertionSpecs.cs | 8 ++++---- .../Primitives/ObjectAssertionSpecs.cs | 4 ++-- .../StringAssertionSpecs.ContainEquivalentOf.cs | 2 +- .../Specialized/ExecutionTimeAssertionsSpecs.cs | 14 +++++++------- .../Types/MethodBaseAssertionSpecs.cs | 2 +- .../Types/TypeAssertionSpecs.HaveIndexer.cs | 2 +- .../Types/TypeAssertionSpecs.Implement.cs | 2 +- .../Xml/XDocumentAssertionSpecs.cs | 2 +- .../Xml/XmlNodeAssertionSpecs.cs | 2 +- 17 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Src/FluentAssertions/Primitives/EnumAssertions.cs b/Src/FluentAssertions/Primitives/EnumAssertions.cs index c6974a806b..0bbd7aea8c 100644 --- a/Src/FluentAssertions/Primitives/EnumAssertions.cs +++ b/Src/FluentAssertions/Primitives/EnumAssertions.cs @@ -177,7 +177,7 @@ public AndConstraint NotBeDefined(string because = "", params objec .FailWith("but it is.") .Then .ClearExpectation(); - + return new AndConstraint((TAssertions)this); } diff --git a/Tests/FluentAssertions.Equivalency.Specs/DataSetSpecs.cs b/Tests/FluentAssertions.Equivalency.Specs/DataSetSpecs.cs index a3618cb0cd..f5f0dd4b7c 100644 --- a/Tests/FluentAssertions.Equivalency.Specs/DataSetSpecs.cs +++ b/Tests/FluentAssertions.Equivalency.Specs/DataSetSpecs.cs @@ -648,7 +648,7 @@ public void When_data_set_table_count_has_expected_value_equivalence_test_should // Act & Assert dataSet.Should().HaveTableCount(correctTableCount); } - + [Fact] public void Null_data_set_fails() { diff --git a/Tests/FluentAssertions.Equivalency.Specs/DataTableSpecs.cs b/Tests/FluentAssertions.Equivalency.Specs/DataTableSpecs.cs index dd8c705488..61e5eaa055 100644 --- a/Tests/FluentAssertions.Equivalency.Specs/DataTableSpecs.cs +++ b/Tests/FluentAssertions.Equivalency.Specs/DataTableSpecs.cs @@ -821,7 +821,7 @@ public void When_data_table_has_expected_column_it_should_succeed() // Act & Assert dataTable.Should().HaveColumn(expectedColumnName); } - + [Fact] public void Null_data_table_has_no_columns_and_fail_the_test() { diff --git a/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.Contain.cs b/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.Contain.cs index 868e32994b..715d7ff3c3 100644 --- a/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.Contain.cs +++ b/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.Contain.cs @@ -238,7 +238,7 @@ public void When_asserting_collection_contains_values_according_to_predicate_but "Expected strings to contain (x == \"xxx\") because we're checking how it reacts to a null subject, but found ."); } } - + public class NotContain { [Fact] diff --git a/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.Equal.cs b/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.Equal.cs index c187a458e1..053f71269c 100644 --- a/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.Equal.cs +++ b/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.Equal.cs @@ -323,7 +323,7 @@ public void When_asserting_equality_with_a_collection_built_from_params_argument act.Should().NotThrow(); } } - + public class NotEqual { [Fact] diff --git a/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.HaveCount.cs b/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.HaveCount.cs index a03935bd4a..c4608b52aa 100644 --- a/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.HaveCount.cs +++ b/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.HaveCount.cs @@ -176,7 +176,7 @@ public void When_counting_generic_collection_it_should_not_enumerate() collection.GetEnumeratorCallCount.Should().Be(0); } } - + public class NotHaveCount { [Fact] diff --git a/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.Satisfy.cs b/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.Satisfy.cs index 516902ff65..ee67c2b44a 100644 --- a/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.Satisfy.cs +++ b/Tests/FluentAssertions.Specs/Collections/CollectionAssertionSpecs.Satisfy.cs @@ -241,7 +241,7 @@ public void When_elements_are_integers_assertion_fails_then_failure_message_must *Index: 2, Element: 3"); } } - + private class SomeClass { public string Text { get; set; } diff --git a/Tests/FluentAssertions.Specs/Primitives/DateTimeAssertionSpecs.cs b/Tests/FluentAssertions.Specs/Primitives/DateTimeAssertionSpecs.cs index 6ea464c89d..c7c2a70a0b 100644 --- a/Tests/FluentAssertions.Specs/Primitives/DateTimeAssertionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Primitives/DateTimeAssertionSpecs.cs @@ -35,7 +35,7 @@ public void Should_fail_when_asserting_nullable_datetime_value_without_a_value_t action.Should().Throw(); } } - + public class NotHaveValue { [Fact] @@ -829,7 +829,7 @@ public void When_asserting_subject_datetime_is_before_the_same_datetime_it_shoul .WithMessage("Expected subject to be before <2016-06-04>, but found <2016-06-04>."); } } - + public class NotBeBefore { [Fact] @@ -875,7 +875,7 @@ public void When_asserting_subject_datetime_is_not_before_the_same_datetime_it_s act.Should().NotThrow(); } } - + public class BeOnOrBefore { [Fact] @@ -921,7 +921,7 @@ public void When_asserting_subject_datetime_is_not_on_or_before_earlier_expected .WithMessage("Expected subject to be on or before <2016-06-03>, but found <2016-06-04>."); } } - + public class NotBeOnOrBefore { [Fact] @@ -968,7 +968,7 @@ public void When_asserting_subject_datetime_is_not_on_or_before_earlier_expected act.Should().NotThrow(); } } - + public class BeAfter { [Fact] @@ -1015,7 +1015,7 @@ public void When_asserting_subject_datetime_is_after_the_same_expected_datetime_ .WithMessage("Expected subject to be after <2016-06-04>, but found <2016-06-04>."); } } - + public class NotBeAfter { [Fact] diff --git a/Tests/FluentAssertions.Specs/Primitives/EnumAssertionSpecs.cs b/Tests/FluentAssertions.Specs/Primitives/EnumAssertionSpecs.cs index ba40334cf4..ba7fd96f52 100644 --- a/Tests/FluentAssertions.Specs/Primitives/EnumAssertionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Primitives/EnumAssertionSpecs.cs @@ -260,7 +260,7 @@ public void When_nullable_enums_are_unequal_it_should_throw(MyEnum? subject, MyE .WithMessage("*because we want to test the failure message*"); } } - + public enum MyEnum { One = 1, @@ -584,7 +584,7 @@ public void When_nullable_enums_have_equal_names_it_should_throw(MyEnum? subject .WithMessage("*because we want to test the failure message*"); } } - + public class NotHaveSameNameAs { [Fact] @@ -643,7 +643,7 @@ public void When_nullable_enums_have_unequal_names_it_should_throw() .WithMessage("*because we want to test the failure message*"); } } - + public enum MyEnumOtherValue { One = 11, @@ -710,7 +710,7 @@ public void When_nullable_enum_is_null_it_should_throw() .WithMessage("*because we want to test the failure message*"); } } - + public class Match { [Fact] diff --git a/Tests/FluentAssertions.Specs/Primitives/ObjectAssertionSpecs.cs b/Tests/FluentAssertions.Specs/Primitives/ObjectAssertionSpecs.cs index ac1acef301..4f57dc2b2e 100644 --- a/Tests/FluentAssertions.Specs/Primitives/ObjectAssertionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Primitives/ObjectAssertionSpecs.cs @@ -955,7 +955,7 @@ public void When_a_system_exception_is_asserted_to_be_serializable_it_should_com act.Should().NotThrow(); } } - + internal class UnserializableClass { public string Name { get; set; } @@ -1017,7 +1017,7 @@ public void GetObjectData(SerializationInfo info, StreamingContext context) info.AddValue("BirthDay", BirthDay); } } - + public class BeXmlSerializable { [Fact] diff --git a/Tests/FluentAssertions.Specs/Primitives/StringAssertionSpecs.ContainEquivalentOf.cs b/Tests/FluentAssertions.Specs/Primitives/StringAssertionSpecs.ContainEquivalentOf.cs index 28f06caec2..088c66d9af 100644 --- a/Tests/FluentAssertions.Specs/Primitives/StringAssertionSpecs.ContainEquivalentOf.cs +++ b/Tests/FluentAssertions.Specs/Primitives/StringAssertionSpecs.ContainEquivalentOf.cs @@ -336,7 +336,7 @@ public void When_string_containment_equivalent_of_at_most_once_is_asserted_and_a act.Should().NotThrow(); } } - + public class ContainEquivalentOfLessThan { [Fact] diff --git a/Tests/FluentAssertions.Specs/Specialized/ExecutionTimeAssertionsSpecs.cs b/Tests/FluentAssertions.Specs/Specialized/ExecutionTimeAssertionsSpecs.cs index a027e5f2b5..ecefaefb54 100644 --- a/Tests/FluentAssertions.Specs/Specialized/ExecutionTimeAssertionsSpecs.cs +++ b/Tests/FluentAssertions.Specs/Specialized/ExecutionTimeAssertionsSpecs.cs @@ -73,7 +73,7 @@ public void When_action_runs_indefinitely_it_should_be_stopped_and_throw_if_ther // Arrange Action someAction = () => { - // lets cause a deadlock + // lets cause a deadlock var semaphore = new Semaphore(0, 1); // my weapon of choice is a semaphore semaphore.WaitOne(); // oops }; @@ -177,7 +177,7 @@ public void When_action_runs_indefinitely_it_should_be_stopped_and_throw_if_ther // Arrange Action someAction = () => { - // lets cause a deadlock + // lets cause a deadlock var semaphore = new Semaphore(0, 1); // my weapon of choice is a semaphore semaphore.WaitOne(); // oops }; @@ -254,7 +254,7 @@ public void When_action_runs_indefinitely_it_should_be_stopped_and_not_throw_if_ // Arrange Action someAction = () => { - // lets cause a deadlock + // lets cause a deadlock var semaphore = new Semaphore(0, 1); // my weapon of choice is a semaphore semaphore.WaitOne(); // oops }; @@ -330,7 +330,7 @@ public void When_action_runs_indefinitely_it_should_be_stopped_and_not_throw_if_ // Arrange Action someAction = () => { - // lets cause a deadlock + // lets cause a deadlock var semaphore = new Semaphore(0, 1); // my weapon of choice is a semaphore semaphore.WaitOne(); // oops }; @@ -425,7 +425,7 @@ public void When_action_runs_indefinitely_it_should_be_stopped_and_throw_if_ther // Arrange Action someAction = () => { - // lets cause a deadlock + // lets cause a deadlock var semaphore = new Semaphore(0, 1); // my weapon of choice is a semaphore semaphore.WaitOne(); // oops }; @@ -463,8 +463,8 @@ public void Stopwatch_is_not_stopped_after_first_execution_time_assertion() // Act Action act = () => { - // I know it's not meant to be used like this, - // but since you can, it should still give consistent results + // I know it's not meant to be used like this, + // but since you can, it should still give consistent results ExecutionTime time = someAction.ExecutionTime(); time.Should().BeGreaterThan(100.Milliseconds()); time.Should().BeGreaterThan(200.Milliseconds()); diff --git a/Tests/FluentAssertions.Specs/Types/MethodBaseAssertionSpecs.cs b/Tests/FluentAssertions.Specs/Types/MethodBaseAssertionSpecs.cs index 107a2bb2d9..6790e97c82 100644 --- a/Tests/FluentAssertions.Specs/Types/MethodBaseAssertionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Types/MethodBaseAssertionSpecs.cs @@ -87,7 +87,7 @@ public void When_asserting_method_return_type_is_null_it_should_throw() .WithParameterName("returnType"); } } - + public class NotReturn { [Fact] diff --git a/Tests/FluentAssertions.Specs/Types/TypeAssertionSpecs.HaveIndexer.cs b/Tests/FluentAssertions.Specs/Types/TypeAssertionSpecs.HaveIndexer.cs index 398bc5eeae..1df8bbdced 100644 --- a/Tests/FluentAssertions.Specs/Types/TypeAssertionSpecs.HaveIndexer.cs +++ b/Tests/FluentAssertions.Specs/Types/TypeAssertionSpecs.HaveIndexer.cs @@ -110,7 +110,7 @@ public void When_asserting_a_type_has_an_indexer_with_a_null_parameter_type_list .WithParameterName("parameterTypes"); } } - + public class NotHaveIndexer { [Fact] diff --git a/Tests/FluentAssertions.Specs/Types/TypeAssertionSpecs.Implement.cs b/Tests/FluentAssertions.Specs/Types/TypeAssertionSpecs.Implement.cs index c1b06bf1bc..cff05ffd60 100644 --- a/Tests/FluentAssertions.Specs/Types/TypeAssertionSpecs.Implement.cs +++ b/Tests/FluentAssertions.Specs/Types/TypeAssertionSpecs.Implement.cs @@ -74,7 +74,7 @@ public void When_asserting_a_type_to_implement_null_it_should_throw() .WithParameterName("interfaceType"); } } - + public class ImplementOfT { [Fact] diff --git a/Tests/FluentAssertions.Specs/Xml/XDocumentAssertionSpecs.cs b/Tests/FluentAssertions.Specs/Xml/XDocumentAssertionSpecs.cs index 611b108557..4c03f71d7c 100644 --- a/Tests/FluentAssertions.Specs/Xml/XDocumentAssertionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Xml/XDocumentAssertionSpecs.cs @@ -363,7 +363,7 @@ public void When_a_document_is_equivalent_to_null_it_fails() "Expected theDocument to be equivalent to \"\" *failure message*" + ", but found ."); } - + [Fact] public void When_assertion_an_xml_document_is_equivalent_to_a_different_xml_document_with_different_namespace_prefix_it_should_succeed() { diff --git a/Tests/FluentAssertions.Specs/Xml/XmlNodeAssertionSpecs.cs b/Tests/FluentAssertions.Specs/Xml/XmlNodeAssertionSpecs.cs index 042ff0498b..4882f98d0f 100644 --- a/Tests/FluentAssertions.Specs/Xml/XmlNodeAssertionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Xml/XmlNodeAssertionSpecs.cs @@ -173,7 +173,7 @@ public void When_asserting_a_null_xml_node_is_not_null_it_should_fail_with_descr .WithMessage("Expected theDocument not to be because we want to test the failure message."); } } - + public class BeEquivalentTo { [Fact]