From 32118123948bd9366fc8eb6e82cd17a9a706570f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20St=C3=BChmer?= Date: Wed, 6 Mar 2024 09:45:03 +0100 Subject: [PATCH] chore: Added the new `CodedUITestAttribute` + Updated the summaries --- .../AcceptanceTestAttribute.cs | 2 +- .../ArchitectureTestAttribute.cs | 2 +- .../BugAttribute.cs | 2 +- .../CodedUITestAttribute.cs | 15 ++++++++++ .../EndToEndTestAttribute.cs | 2 +- .../EpicAttribute.cs | 2 +- .../FeatureAttribute.cs | 2 +- .../FunctionalTestAttribute.cs | 2 +- .../IntegrationTestAttribute.cs | 2 +- src/NetEvolve.Extensions.MSTest/Internals.cs | 5 ++++ .../IssueAttribute.cs | 2 +- .../PerformanceTestAttribute.cs | 2 +- .../PostDeploymentAttribute.cs | 2 +- .../PreDeploymentAttribute.cs | 2 +- .../UnitTestAttribute.cs | 2 +- .../UserStoryAttribute.cs | 2 +- .../WorkItemAttribute.cs | 2 +- .../AcceptanceTestAttribute.cs | 2 +- .../ArchitectureTestAttribute.cs | 2 +- .../BugAttribute.cs | 2 +- .../CodedUITestAttribute.cs | 15 ++++++++++ .../EndToEndTestAttribute.cs | 2 +- .../EpicAttribute.cs | 2 +- .../FeatureAttribute.cs | 2 +- .../FunctionalTestAttribute.cs | 2 +- .../IntegrationTestAttribute.cs | 2 +- src/NetEvolve.Extensions.NUnit/Internals.cs | 5 ++++ .../IssueAttribute.cs | 2 +- .../PerformanceTestAttribute.cs | 2 +- .../PostDeploymentAttribute.cs | 2 +- .../PreDeploymentAttribute.cs | 2 +- .../UnitTestAttribute.cs | 2 +- .../UserStoryAttribute.cs | 2 +- .../WorkItemAttribute.cs | 2 +- .../AcceptanceTestAttribute.cs | 2 +- .../ArchitectureTestAttribute.cs | 2 +- .../BugAttribute.cs | 2 +- .../CodedUITestAttribute.cs | 15 ++++++++++ .../EndToEndTestAttribute.cs | 2 +- .../EpicAttribute.cs | 2 +- .../FeatureAttribute.cs | 2 +- .../FunctionalTestAttribute.cs | 2 +- .../IntegrationTestAttribute.cs | 2 +- src/NetEvolve.Extensions.XUnit/Internals.cs | 5 ++++ .../IssueAttribute.cs | 2 +- .../PerformanceTestAttribute.cs | 2 +- .../PostDeploymentAttribute.cs | 2 +- .../PreDeploymentAttribute.cs | 2 +- .../UnitTestAttribute.cs | 2 +- .../UserStoryAttribute.cs | 2 +- .../WorkItemAttribute.cs | 2 +- .../CodedUITestAttributeTests.cs | 28 +++++++++++++++++++ .../CodedUITestAttributeTests.cs | 27 ++++++++++++++++++ .../CodedUITestAttributeTests.cs | 27 ++++++++++++++++++ ...without_or_invalid_parameters.verified.txt | 5 ++++ ...odedUITest_without_parameters.verified.txt | 5 ++++ 56 files changed, 197 insertions(+), 45 deletions(-) create mode 100644 src/NetEvolve.Extensions.MSTest/CodedUITestAttribute.cs create mode 100644 src/NetEvolve.Extensions.NUnit/CodedUITestAttribute.cs create mode 100644 src/NetEvolve.Extensions.XUnit/CodedUITestAttribute.cs create mode 100644 tests/NetEvolve.Extensions.MSTest.Tests.Unit/CodedUITestAttributeTests.cs create mode 100644 tests/NetEvolve.Extensions.NUnit.Tests.Unit/CodedUITestAttributeTests.cs create mode 100644 tests/NetEvolve.Extensions.XUnit.Tests.Unit/CodedUITestAttributeTests.cs create mode 100644 tests/_snapshot/CodedUITestAttributeTests.CodedUITest_without_or_invalid_parameters_methodName=CodedUITest_without_or_invalid_parameters.verified.txt create mode 100644 tests/_snapshot/CodedUITestAttributeTests.CodedUITest_without_or_invalid_parameters_methodName=CodedUITest_without_parameters.verified.txt diff --git a/src/NetEvolve.Extensions.MSTest/AcceptanceTestAttribute.cs b/src/NetEvolve.Extensions.MSTest/AcceptanceTestAttribute.cs index 0bdf5d5..c30902b 100644 --- a/src/NetEvolve.Extensions.MSTest/AcceptanceTestAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/AcceptanceTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as AcceptanceTest. +/// Attribute used to decorate a test class or method as AcceptanceTest. /// public sealed class AcceptanceTestAttribute : TestTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.MSTest/ArchitectureTestAttribute.cs b/src/NetEvolve.Extensions.MSTest/ArchitectureTestAttribute.cs index 6cd0165..722b964 100644 --- a/src/NetEvolve.Extensions.MSTest/ArchitectureTestAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/ArchitectureTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as ArchitectureTest. +/// Attribute used to decorate a test class or method as ArchitectureTest. /// public sealed class ArchitectureTestAttribute : TestTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.MSTest/BugAttribute.cs b/src/NetEvolve.Extensions.MSTest/BugAttribute.cs index eb40ee8..500543d 100644 --- a/src/NetEvolve.Extensions.MSTest/BugAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/BugAttribute.cs @@ -4,7 +4,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as Bug, with optional Id +/// Attribute used to decorate a test class or method as Bug, with optional Id. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class BugAttribute : TestCategoryWithIdBaseAttribute diff --git a/src/NetEvolve.Extensions.MSTest/CodedUITestAttribute.cs b/src/NetEvolve.Extensions.MSTest/CodedUITestAttribute.cs new file mode 100644 index 0000000..bc59200 --- /dev/null +++ b/src/NetEvolve.Extensions.MSTest/CodedUITestAttribute.cs @@ -0,0 +1,15 @@ +namespace NetEvolve.Extensions.MSTest; + +using NetEvolve.Extensions.MSTest.Internal; + +/// +/// Attribute used to decorate a test class or method as CodedUITest. +/// +public sealed class CodedUITestAttribute : TestTraitBaseAttribute +{ + /// + /// Initializes a new instance of the class. + /// + public CodedUITestAttribute() + : base(Internals.CodedUITest) { } +} diff --git a/src/NetEvolve.Extensions.MSTest/EndToEndTestAttribute.cs b/src/NetEvolve.Extensions.MSTest/EndToEndTestAttribute.cs index eb38ab2..e58c3f0 100644 --- a/src/NetEvolve.Extensions.MSTest/EndToEndTestAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/EndToEndTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as EndToEndTest. +/// Attribute used to decorate a test class or method as EndToEndTest. /// public sealed class EndToEndTestAttribute : TestTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.MSTest/EpicAttribute.cs b/src/NetEvolve.Extensions.MSTest/EpicAttribute.cs index 904b94b..e75c533 100644 --- a/src/NetEvolve.Extensions.MSTest/EpicAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/EpicAttribute.cs @@ -4,7 +4,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as Epic, with optional Id +/// Attribute used to decorate a test class or method as Epic, with optional Id. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class EpicAttribute : TestCategoryWithIdBaseAttribute diff --git a/src/NetEvolve.Extensions.MSTest/FeatureAttribute.cs b/src/NetEvolve.Extensions.MSTest/FeatureAttribute.cs index 64f5cef..a93aec1 100644 --- a/src/NetEvolve.Extensions.MSTest/FeatureAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/FeatureAttribute.cs @@ -4,7 +4,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as Feature, with optional Id +/// Attribute used to decorate a test class or method as Feature, with optional Id. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class FeatureAttribute : TestCategoryWithIdBaseAttribute diff --git a/src/NetEvolve.Extensions.MSTest/FunctionalTestAttribute.cs b/src/NetEvolve.Extensions.MSTest/FunctionalTestAttribute.cs index 5edcca2..787c3b5 100644 --- a/src/NetEvolve.Extensions.MSTest/FunctionalTestAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/FunctionalTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as FunctionalTest. +/// Attribute used to decorate a test class or method as FunctionalTest. /// public sealed class FunctionalTestAttribute : TestTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.MSTest/IntegrationTestAttribute.cs b/src/NetEvolve.Extensions.MSTest/IntegrationTestAttribute.cs index 9702ee9..3f60540 100644 --- a/src/NetEvolve.Extensions.MSTest/IntegrationTestAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/IntegrationTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as IntegrationTest. +/// Attribute used to decorate a test class or method as IntegrationTest. /// public sealed class IntegrationTestAttribute : TestTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.MSTest/Internals.cs b/src/NetEvolve.Extensions.MSTest/Internals.cs index f579afb..937082a 100644 --- a/src/NetEvolve.Extensions.MSTest/Internals.cs +++ b/src/NetEvolve.Extensions.MSTest/Internals.cs @@ -94,4 +94,9 @@ internal static class Internals /// ArchitectureTests /// public const string ArchitectureTest = nameof(ArchitectureTest); + + /// + /// CodedUITests + /// + public const string CodedUITest = nameof(CodedUITest); } diff --git a/src/NetEvolve.Extensions.MSTest/IssueAttribute.cs b/src/NetEvolve.Extensions.MSTest/IssueAttribute.cs index ab7a0d0..addd4d1 100644 --- a/src/NetEvolve.Extensions.MSTest/IssueAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/IssueAttribute.cs @@ -4,7 +4,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as Issue, with optional Id +/// Attribute used to decorate a test class or method as Issue, with optional Id. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class IssueAttribute : TestCategoryWithIdBaseAttribute diff --git a/src/NetEvolve.Extensions.MSTest/PerformanceTestAttribute.cs b/src/NetEvolve.Extensions.MSTest/PerformanceTestAttribute.cs index 501c732..e059a5e 100644 --- a/src/NetEvolve.Extensions.MSTest/PerformanceTestAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/PerformanceTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as PerformanceTest. +/// Attribute used to decorate a test class or method as PerformanceTest. /// public sealed class PerformanceTestAttribute : TestTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.MSTest/PostDeploymentAttribute.cs b/src/NetEvolve.Extensions.MSTest/PostDeploymentAttribute.cs index 0244325..bca0f60 100644 --- a/src/NetEvolve.Extensions.MSTest/PostDeploymentAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/PostDeploymentAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as PostDeployment. +/// Attribute used to decorate a test class or method as PostDeployment. /// public sealed class PostDeploymentAttribute : TestTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.MSTest/PreDeploymentAttribute.cs b/src/NetEvolve.Extensions.MSTest/PreDeploymentAttribute.cs index 2194116..1309a2c 100644 --- a/src/NetEvolve.Extensions.MSTest/PreDeploymentAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/PreDeploymentAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as PreDeployment. +/// Attribute used to decorate a test class or method as PreDeployment. /// public sealed class PreDeploymentAttribute : TestTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.MSTest/UnitTestAttribute.cs b/src/NetEvolve.Extensions.MSTest/UnitTestAttribute.cs index 6c278b4..ad6032c 100644 --- a/src/NetEvolve.Extensions.MSTest/UnitTestAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/UnitTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as UnitTest. +/// Attribute used to decorate a test class or method as UnitTest. /// public sealed class UnitTestAttribute : TestTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.MSTest/UserStoryAttribute.cs b/src/NetEvolve.Extensions.MSTest/UserStoryAttribute.cs index 955de02..639b26a 100644 --- a/src/NetEvolve.Extensions.MSTest/UserStoryAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/UserStoryAttribute.cs @@ -4,7 +4,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as UserStory, with optional Id +/// Attribute used to decorate a test class or method as UserStory, with optional Id. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class UserStoryAttribute : TestCategoryWithIdBaseAttribute diff --git a/src/NetEvolve.Extensions.MSTest/WorkItemAttribute.cs b/src/NetEvolve.Extensions.MSTest/WorkItemAttribute.cs index 297fb6e..52aafe2 100644 --- a/src/NetEvolve.Extensions.MSTest/WorkItemAttribute.cs +++ b/src/NetEvolve.Extensions.MSTest/WorkItemAttribute.cs @@ -4,7 +4,7 @@ using NetEvolve.Extensions.MSTest.Internal; /// -/// Attribute used to decorate a test class or method as WorkItem, with optional Id +/// Attribute used to decorate a test class or method as WorkItem, with optional Id. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class WorkItemAttribute : TestCategoryWithIdBaseAttribute diff --git a/src/NetEvolve.Extensions.NUnit/AcceptanceTestAttribute.cs b/src/NetEvolve.Extensions.NUnit/AcceptanceTestAttribute.cs index 9e78db9..0a4be3a 100644 --- a/src/NetEvolve.Extensions.NUnit/AcceptanceTestAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/AcceptanceTestAttribute.cs @@ -3,7 +3,7 @@ using global::NUnit.Framework; /// -/// Attribute used to decorate a test class or method as AcceptanceTest. +/// Attribute used to decorate a test class or method as AcceptanceTest. /// public sealed class AcceptanceTestAttribute : CategoryAttribute { diff --git a/src/NetEvolve.Extensions.NUnit/ArchitectureTestAttribute.cs b/src/NetEvolve.Extensions.NUnit/ArchitectureTestAttribute.cs index 21bd80a..fec2579 100644 --- a/src/NetEvolve.Extensions.NUnit/ArchitectureTestAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/ArchitectureTestAttribute.cs @@ -3,7 +3,7 @@ using global::NUnit.Framework; /// -/// Attribute used to decorate a test class or method as UnitTest. +/// Attribute used to decorate a test class or method as ArchitectureTest. /// public sealed class ArchitectureTestAttribute : CategoryAttribute { diff --git a/src/NetEvolve.Extensions.NUnit/BugAttribute.cs b/src/NetEvolve.Extensions.NUnit/BugAttribute.cs index 89d8a51..3d0452f 100644 --- a/src/NetEvolve.Extensions.NUnit/BugAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/BugAttribute.cs @@ -4,7 +4,7 @@ using NetEvolve.Extensions.NUnit.Internal; /// -/// Attribute used to decorate a test class or method as Bug, with optional Id +/// Attribute used to decorate a test class or method as Bug, with optional Id. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class BugAttribute : CategoryIdBaseAttribute diff --git a/src/NetEvolve.Extensions.NUnit/CodedUITestAttribute.cs b/src/NetEvolve.Extensions.NUnit/CodedUITestAttribute.cs new file mode 100644 index 0000000..5bcf46c --- /dev/null +++ b/src/NetEvolve.Extensions.NUnit/CodedUITestAttribute.cs @@ -0,0 +1,15 @@ +namespace NetEvolve.Extensions.NUnit; + +using global::NUnit.Framework; + +/// +/// Attribute used to decorate a test class or method as CodedUITest. +/// +public sealed class CodedUITestAttribute : CategoryAttribute +{ + /// + /// Initializes a new instance of the class. + /// + public CodedUITestAttribute() + : base(Internals.CodedUITest) { } +} diff --git a/src/NetEvolve.Extensions.NUnit/EndToEndTestAttribute.cs b/src/NetEvolve.Extensions.NUnit/EndToEndTestAttribute.cs index 67f5a14..53dc6d1 100644 --- a/src/NetEvolve.Extensions.NUnit/EndToEndTestAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/EndToEndTestAttribute.cs @@ -3,7 +3,7 @@ using global::NUnit.Framework; /// -/// Attribute used to decorate a test class or method as EndToEndTest. +/// Attribute used to decorate a test class or method as EndToEndTest. /// public sealed class EndToEndTestAttribute : CategoryAttribute { diff --git a/src/NetEvolve.Extensions.NUnit/EpicAttribute.cs b/src/NetEvolve.Extensions.NUnit/EpicAttribute.cs index d7c6e61..2a7f5c7 100644 --- a/src/NetEvolve.Extensions.NUnit/EpicAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/EpicAttribute.cs @@ -4,7 +4,7 @@ using NetEvolve.Extensions.NUnit.Internal; /// -/// Attribute used to decorate a test class or method as Epic, with optional Id +/// Attribute used to decorate a test class or method as Epic, with optional Id. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class EpicAttribute : CategoryIdBaseAttribute diff --git a/src/NetEvolve.Extensions.NUnit/FeatureAttribute.cs b/src/NetEvolve.Extensions.NUnit/FeatureAttribute.cs index 227fbf3..7f13343 100644 --- a/src/NetEvolve.Extensions.NUnit/FeatureAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/FeatureAttribute.cs @@ -4,7 +4,7 @@ using NetEvolve.Extensions.NUnit.Internal; /// -/// Attribute used to decorate a test class or method as Feature, with optional Id +/// Attribute used to decorate a test class or method as Feature, with optional Id. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class FeatureAttribute : CategoryIdBaseAttribute diff --git a/src/NetEvolve.Extensions.NUnit/FunctionalTestAttribute.cs b/src/NetEvolve.Extensions.NUnit/FunctionalTestAttribute.cs index ff28771..65acf68 100644 --- a/src/NetEvolve.Extensions.NUnit/FunctionalTestAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/FunctionalTestAttribute.cs @@ -3,7 +3,7 @@ using global::NUnit.Framework; /// -/// Attribute used to decorate a test class or method as FunctionalTest. +/// Attribute used to decorate a test class or method as FunctionalTest. /// public sealed class FunctionalTestAttribute : CategoryAttribute { diff --git a/src/NetEvolve.Extensions.NUnit/IntegrationTestAttribute.cs b/src/NetEvolve.Extensions.NUnit/IntegrationTestAttribute.cs index 41fe1f9..7ed9bb4 100644 --- a/src/NetEvolve.Extensions.NUnit/IntegrationTestAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/IntegrationTestAttribute.cs @@ -4,7 +4,7 @@ using global::NUnit.Framework; /// -/// Attribute used to decorate a test class or method as IntegrationTest. +/// Attribute used to decorate a test class or method as IntegrationTest. /// [AttributeUsage( AttributeTargets.Class | AttributeTargets.Method, diff --git a/src/NetEvolve.Extensions.NUnit/Internals.cs b/src/NetEvolve.Extensions.NUnit/Internals.cs index 332026f..3463679 100644 --- a/src/NetEvolve.Extensions.NUnit/Internals.cs +++ b/src/NetEvolve.Extensions.NUnit/Internals.cs @@ -94,4 +94,9 @@ internal static class Internals /// ArchitectureTests /// public const string ArchitectureTest = nameof(ArchitectureTest); + + /// + /// CodedUITests + /// + public const string CodedUITest = nameof(CodedUITest); } diff --git a/src/NetEvolve.Extensions.NUnit/IssueAttribute.cs b/src/NetEvolve.Extensions.NUnit/IssueAttribute.cs index ae0fb7e..54e3ce3 100644 --- a/src/NetEvolve.Extensions.NUnit/IssueAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/IssueAttribute.cs @@ -4,7 +4,7 @@ using NetEvolve.Extensions.NUnit.Internal; /// -/// Attribute used to decorate a test class or method as Issue, with optional Id +/// Attribute used to decorate a test class or method as Issue, with optional Id. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class IssueAttribute : CategoryIdBaseAttribute diff --git a/src/NetEvolve.Extensions.NUnit/PerformanceTestAttribute.cs b/src/NetEvolve.Extensions.NUnit/PerformanceTestAttribute.cs index f2c26a8..7379632 100644 --- a/src/NetEvolve.Extensions.NUnit/PerformanceTestAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/PerformanceTestAttribute.cs @@ -3,7 +3,7 @@ using global::NUnit.Framework; /// -/// Attribute used to decorate a test class or method as PerformanceTest. +/// Attribute used to decorate a test class or method as PerformanceTest. /// public sealed class PerformanceTestAttribute : CategoryAttribute { diff --git a/src/NetEvolve.Extensions.NUnit/PostDeploymentAttribute.cs b/src/NetEvolve.Extensions.NUnit/PostDeploymentAttribute.cs index ab57a22..15b7058 100644 --- a/src/NetEvolve.Extensions.NUnit/PostDeploymentAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/PostDeploymentAttribute.cs @@ -3,7 +3,7 @@ using global::NUnit.Framework; /// -/// Attribute used to decorate a test class or method as PostDeployment. +/// Attribute used to decorate a test class or method as PostDeployment. /// public sealed class PostDeploymentAttribute : CategoryAttribute { diff --git a/src/NetEvolve.Extensions.NUnit/PreDeploymentAttribute.cs b/src/NetEvolve.Extensions.NUnit/PreDeploymentAttribute.cs index 727635b..c1d944c 100644 --- a/src/NetEvolve.Extensions.NUnit/PreDeploymentAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/PreDeploymentAttribute.cs @@ -3,7 +3,7 @@ using global::NUnit.Framework; /// -/// Attribute used to decorate a test class or method as PreDeployment. +/// Attribute used to decorate a test class or method as PreDeployment. /// public sealed class PreDeploymentAttribute : CategoryAttribute { diff --git a/src/NetEvolve.Extensions.NUnit/UnitTestAttribute.cs b/src/NetEvolve.Extensions.NUnit/UnitTestAttribute.cs index 6df0694..e68cd03 100644 --- a/src/NetEvolve.Extensions.NUnit/UnitTestAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/UnitTestAttribute.cs @@ -3,7 +3,7 @@ using global::NUnit.Framework; /// -/// Attribute used to decorate a test class or method as UnitTest. +/// Attribute used to decorate a test class or method as UnitTest. /// public sealed class UnitTestAttribute : CategoryAttribute { diff --git a/src/NetEvolve.Extensions.NUnit/UserStoryAttribute.cs b/src/NetEvolve.Extensions.NUnit/UserStoryAttribute.cs index 4dd5f17..f2aa8e6 100644 --- a/src/NetEvolve.Extensions.NUnit/UserStoryAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/UserStoryAttribute.cs @@ -4,7 +4,7 @@ using NetEvolve.Extensions.NUnit.Internal; /// -/// Attribute used to decorate a test class or method as UserStory, with optional Id +/// Attribute used to decorate a test class or method as UserStory, with optional Id. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class UserStoryAttribute : CategoryIdBaseAttribute diff --git a/src/NetEvolve.Extensions.NUnit/WorkItemAttribute.cs b/src/NetEvolve.Extensions.NUnit/WorkItemAttribute.cs index 3b05a3c..ba44425 100644 --- a/src/NetEvolve.Extensions.NUnit/WorkItemAttribute.cs +++ b/src/NetEvolve.Extensions.NUnit/WorkItemAttribute.cs @@ -4,7 +4,7 @@ using NetEvolve.Extensions.NUnit.Internal; /// -/// Attribute used to decorate a test class or method as WorkItem, with optional Id +/// Attribute used to decorate a test class or method as WorkItem, with optional Id. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class WorkItemAttribute : CategoryIdBaseAttribute diff --git a/src/NetEvolve.Extensions.XUnit/AcceptanceTestAttribute.cs b/src/NetEvolve.Extensions.XUnit/AcceptanceTestAttribute.cs index 08a6bbe..1190a19 100644 --- a/src/NetEvolve.Extensions.XUnit/AcceptanceTestAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/AcceptanceTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method as +/// Attribute used to decorate a test class or method as AcceptanceTest. /// public sealed class AcceptanceTestAttribute : CategoryTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.XUnit/ArchitectureTestAttribute.cs b/src/NetEvolve.Extensions.XUnit/ArchitectureTestAttribute.cs index 01d454c..6c8754b 100644 --- a/src/NetEvolve.Extensions.XUnit/ArchitectureTestAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/ArchitectureTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method as ArchitectureTest +/// Attribute used to decorate a test class or method as ArchitectureTest. /// public sealed class ArchitectureTestAttribute : CategoryTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.XUnit/BugAttribute.cs b/src/NetEvolve.Extensions.XUnit/BugAttribute.cs index 8af86ef..161fa0e 100644 --- a/src/NetEvolve.Extensions.XUnit/BugAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/BugAttribute.cs @@ -4,7 +4,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method as Bug, with optional Id +/// Attribute used to decorate a test class or method as Bug, with optional Id. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] public sealed class BugAttribute : CategoryWithIdTraitBaseAttribute diff --git a/src/NetEvolve.Extensions.XUnit/CodedUITestAttribute.cs b/src/NetEvolve.Extensions.XUnit/CodedUITestAttribute.cs new file mode 100644 index 0000000..63ac6f1 --- /dev/null +++ b/src/NetEvolve.Extensions.XUnit/CodedUITestAttribute.cs @@ -0,0 +1,15 @@ +namespace NetEvolve.Extensions.XUnit; + +using NetEvolve.Extensions.XUnit.Internal; + +/// +/// Attribute used to decorate a test class or method as CodedUITest. +/// +public sealed class CodedUITestAttribute : CategoryTraitBaseAttribute +{ + /// + /// Initializes a new instance of the class. + /// + public CodedUITestAttribute() + : base(Internals.CodedUITest) { } +} diff --git a/src/NetEvolve.Extensions.XUnit/EndToEndTestAttribute.cs b/src/NetEvolve.Extensions.XUnit/EndToEndTestAttribute.cs index 234d157..ca76a12 100644 --- a/src/NetEvolve.Extensions.XUnit/EndToEndTestAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/EndToEndTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method as EndToEndTest +/// Attribute used to decorate a test class or method as EndToEndTest. /// public sealed class EndToEndTestAttribute : CategoryTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.XUnit/EpicAttribute.cs b/src/NetEvolve.Extensions.XUnit/EpicAttribute.cs index 9a4791e..5e65fd2 100644 --- a/src/NetEvolve.Extensions.XUnit/EpicAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/EpicAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method as Epic, with optional Id +/// Attribute used to decorate a test class or method as Epic, with optional Id /// public sealed class EpicAttribute : CategoryWithIdTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.XUnit/FeatureAttribute.cs b/src/NetEvolve.Extensions.XUnit/FeatureAttribute.cs index 325c304..70f6081 100644 --- a/src/NetEvolve.Extensions.XUnit/FeatureAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/FeatureAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method as Feature, with optional Id +/// Attribute used to decorate a test class or method as Feature, with optional Id /// public sealed class FeatureAttribute : CategoryWithIdTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.XUnit/FunctionalTestAttribute.cs b/src/NetEvolve.Extensions.XUnit/FunctionalTestAttribute.cs index 3871baa..cf59f90 100644 --- a/src/NetEvolve.Extensions.XUnit/FunctionalTestAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/FunctionalTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method as IntegrationTest +/// Attribute used to decorate a test class or method as FunctionalTest. /// public sealed class FunctionalTestAttribute : CategoryTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.XUnit/IntegrationTestAttribute.cs b/src/NetEvolve.Extensions.XUnit/IntegrationTestAttribute.cs index 1d9c6fa..a4b727a 100644 --- a/src/NetEvolve.Extensions.XUnit/IntegrationTestAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/IntegrationTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method as IntegrationTest +/// Attribute used to decorate a test class or method as IntegrationTest. /// public sealed class IntegrationTestAttribute : CategoryTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.XUnit/Internals.cs b/src/NetEvolve.Extensions.XUnit/Internals.cs index 0f47f38..8d54422 100644 --- a/src/NetEvolve.Extensions.XUnit/Internals.cs +++ b/src/NetEvolve.Extensions.XUnit/Internals.cs @@ -104,4 +104,9 @@ internal static class Internals /// ArchitectureTest /// public const string ArchitectureTest = nameof(ArchitectureTest); + + /// + /// CodedUITest + /// + public const string CodedUITest = nameof(CodedUITest); } diff --git a/src/NetEvolve.Extensions.XUnit/IssueAttribute.cs b/src/NetEvolve.Extensions.XUnit/IssueAttribute.cs index 20f0a70..cc1c4cd 100644 --- a/src/NetEvolve.Extensions.XUnit/IssueAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/IssueAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method as Issue, with optional Id +/// Attribute used to decorate a test class or method as Issue, with optional Id /// public sealed class IssueAttribute : CategoryWithIdTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.XUnit/PerformanceTestAttribute.cs b/src/NetEvolve.Extensions.XUnit/PerformanceTestAttribute.cs index 1ee5e8a..9ed02fb 100644 --- a/src/NetEvolve.Extensions.XUnit/PerformanceTestAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/PerformanceTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method as PerformanceTest +/// Attribute used to decorate a test class or method as PerformanceTest. /// public sealed class PerformanceTestAttribute : CategoryTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.XUnit/PostDeploymentAttribute.cs b/src/NetEvolve.Extensions.XUnit/PostDeploymentAttribute.cs index 8a02d2c..7f69ad7 100644 --- a/src/NetEvolve.Extensions.XUnit/PostDeploymentAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/PostDeploymentAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method with TestCategory PostDeployment +/// Attribute used to decorate a test class or method with TestCategory PostDeployment. /// public sealed class PostDeploymentAttribute : CategoryTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.XUnit/PreDeploymentAttribute.cs b/src/NetEvolve.Extensions.XUnit/PreDeploymentAttribute.cs index bca131e..6d55f66 100644 --- a/src/NetEvolve.Extensions.XUnit/PreDeploymentAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/PreDeploymentAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method with TestCategory PreDeployment +/// Attribute used to decorate a test class or method with TestCategory PreDeployment. /// public sealed class PreDeploymentAttribute : CategoryTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.XUnit/UnitTestAttribute.cs b/src/NetEvolve.Extensions.XUnit/UnitTestAttribute.cs index ba1b21d..f562e82 100644 --- a/src/NetEvolve.Extensions.XUnit/UnitTestAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/UnitTestAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method as UnitTest +/// Attribute used to decorate a test class or method as UnitTest. /// public sealed class UnitTestAttribute : CategoryTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.XUnit/UserStoryAttribute.cs b/src/NetEvolve.Extensions.XUnit/UserStoryAttribute.cs index a302a24..d242e19 100644 --- a/src/NetEvolve.Extensions.XUnit/UserStoryAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/UserStoryAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method as UserStory, with optional Id +/// Attribute used to decorate a test class or method as UserStory, with optional Id /// public sealed class UserStoryAttribute : CategoryWithIdTraitBaseAttribute { diff --git a/src/NetEvolve.Extensions.XUnit/WorkItemAttribute.cs b/src/NetEvolve.Extensions.XUnit/WorkItemAttribute.cs index 26a3b2c..b74747a 100644 --- a/src/NetEvolve.Extensions.XUnit/WorkItemAttribute.cs +++ b/src/NetEvolve.Extensions.XUnit/WorkItemAttribute.cs @@ -3,7 +3,7 @@ using NetEvolve.Extensions.XUnit.Internal; /// -/// Attribute used to decorate a test class or method as WorkItem, with optional Id +/// Attribute used to decorate a test class or method as WorkItem, with optional Id /// public sealed class WorkItemAttribute : CategoryWithIdTraitBaseAttribute { diff --git a/tests/NetEvolve.Extensions.MSTest.Tests.Unit/CodedUITestAttributeTests.cs b/tests/NetEvolve.Extensions.MSTest.Tests.Unit/CodedUITestAttributeTests.cs new file mode 100644 index 0000000..6d80eee --- /dev/null +++ b/tests/NetEvolve.Extensions.MSTest.Tests.Unit/CodedUITestAttributeTests.cs @@ -0,0 +1,28 @@ +namespace NetEvolve.Extensions.MSTest.Tests.Unit; + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Threading.Tasks; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +/// +/// Unit tests for . +/// +[ExcludeFromCodeCoverage] +[TestClass] +public class CodedUITestAttributeTests : AttributeTestsBase +{ + [TestMethod] + [CodedUITest] + [DataRow(nameof(CodedUITest_without_parameters))] + [DataRow(nameof(CodedUITest_without_or_invalid_parameters))] + public async Task CodedUITest_without_or_invalid_parameters(string methodName) + { + var properties = GetProperties(methodName); + + _ = await VerifyMSTest(properties).UseParameters(methodName); + } + + [CodedUITest] + private void CodedUITest_without_parameters() => throw new NotSupportedException(); +} diff --git a/tests/NetEvolve.Extensions.NUnit.Tests.Unit/CodedUITestAttributeTests.cs b/tests/NetEvolve.Extensions.NUnit.Tests.Unit/CodedUITestAttributeTests.cs new file mode 100644 index 0000000..e67ee58 --- /dev/null +++ b/tests/NetEvolve.Extensions.NUnit.Tests.Unit/CodedUITestAttributeTests.cs @@ -0,0 +1,27 @@ +namespace NetEvolve.Extensions.NUnit.Tests.Unit; + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Threading.Tasks; +using global::NUnit.Framework; + +/// +/// Unit tests for . +/// +[ExcludeFromCodeCoverage] +public class CodedUITestAttributeTests : AttributeTestsBase +{ + [Theory] + [CodedUITest] + [TestCase(nameof(CodedUITest_without_parameters))] + [TestCase(nameof(CodedUITest_without_or_invalid_parameters))] + public async Task CodedUITest_without_or_invalid_parameters(string methodName) + { + var properties = GetProperties(methodName); + + _ = await Verify(properties).UseParameters(methodName); + } + + [CodedUITest] + private void CodedUITest_without_parameters() => throw new NotSupportedException(); +} diff --git a/tests/NetEvolve.Extensions.XUnit.Tests.Unit/CodedUITestAttributeTests.cs b/tests/NetEvolve.Extensions.XUnit.Tests.Unit/CodedUITestAttributeTests.cs new file mode 100644 index 0000000..e51d861 --- /dev/null +++ b/tests/NetEvolve.Extensions.XUnit.Tests.Unit/CodedUITestAttributeTests.cs @@ -0,0 +1,27 @@ +namespace NetEvolve.Extensions.XUnit.Tests.Unit; + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Threading.Tasks; +using Xunit; + +/// +/// Unit tests for . +/// +[ExcludeFromCodeCoverage] +public class CodedUITestAttributeTests : AttributeTestsBase +{ + [Theory] + [CodedUITest] + [InlineData(nameof(CodedUITest_without_parameters))] + [InlineData(nameof(CodedUITest_without_or_invalid_parameters))] + public async Task CodedUITest_without_or_invalid_parameters(string methodName) + { + var traits = GetTraits(methodName); + + _ = await Verify(traits).UseParameters(methodName); + } + + [CodedUITest] + protected void CodedUITest_without_parameters() => throw new NotSupportedException(); +} diff --git a/tests/_snapshot/CodedUITestAttributeTests.CodedUITest_without_or_invalid_parameters_methodName=CodedUITest_without_or_invalid_parameters.verified.txt b/tests/_snapshot/CodedUITestAttributeTests.CodedUITest_without_or_invalid_parameters_methodName=CodedUITest_without_or_invalid_parameters.verified.txt new file mode 100644 index 0000000..159bd6a --- /dev/null +++ b/tests/_snapshot/CodedUITestAttributeTests.CodedUITest_without_or_invalid_parameters_methodName=CodedUITest_without_or_invalid_parameters.verified.txt @@ -0,0 +1,5 @@ +[ + { + TestCategory: CodedUITest + } +] \ No newline at end of file diff --git a/tests/_snapshot/CodedUITestAttributeTests.CodedUITest_without_or_invalid_parameters_methodName=CodedUITest_without_parameters.verified.txt b/tests/_snapshot/CodedUITestAttributeTests.CodedUITest_without_or_invalid_parameters_methodName=CodedUITest_without_parameters.verified.txt new file mode 100644 index 0000000..159bd6a --- /dev/null +++ b/tests/_snapshot/CodedUITestAttributeTests.CodedUITest_without_or_invalid_parameters_methodName=CodedUITest_without_parameters.verified.txt @@ -0,0 +1,5 @@ +[ + { + TestCategory: CodedUITest + } +] \ No newline at end of file