diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8f2ed41c2..781b2268f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -122,10 +122,10 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup .NET Core - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v5 with: dotnet-version: | - 8.x.x + 8.0.x - name: Configure Windows for automation uses: ./.github/actions/setup-winapp - name: Install Appium @@ -208,13 +208,16 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup .NET Core - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v5 with: dotnet-version: | - 8.x.x + 8.0.x - name: Start test service run: Start-Process -FilePath "dotnet" -ArgumentList "run --project Docker/MAQSService/MainTestService/MainTestService.csproj" shell: pwsh + - name: Wait for webservice to come online + run: sleep 30s + shell: bash - id: builder uses: ./.github/workflows/buildtest-action with: @@ -231,7 +234,7 @@ jobs: test-playwright: name: Playwright needs: waitOld - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup .NET Core @@ -302,7 +305,7 @@ jobs: - name: Build the docker-compose stack run: docker compose -f Docker/MAQSSQLServer/docker-compose.yml -p openmaqs_maqs-dotnet up -d - name: Wait for DB to come online - run: sleep 10s + run: sleep 30s shell: bash - id: builder uses: ./.github/workflows/buildtest-action @@ -386,8 +389,8 @@ jobs: artifactTests/framework/**/*.xml artifactTests/framework/testResults/ - test-specflow: - name: SpecFlow + test-gherkin: + name: Gherkin needs: waitOld runs-on: ubuntu-latest steps: @@ -402,15 +405,15 @@ jobs: - id: builder uses: ./.github/workflows/buildtest-action with: - bt-param: 'Framework/SpecFlowExtensionUnitTests/SpecFlowExtensionUnitTests.csproj --settings Framework/Parallel.RunSettings --logger trx --results-directory "${{github.workspace}}/artifactTests/specflow/testResults/" /p:CoverletOutput="${{github.workspace}}/artifactTests/specflow/" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover' + bt-param: 'Framework/GherkinExtensionUnitTests/GherkinExtensionUnitTests.csproj --settings Framework/Parallel.RunSettings --logger trx --results-directory "${{github.workspace}}/artifactTests/gherkin/testResults/" /p:CoverletOutput="${{github.workspace}}/artifactTests/gherkin/" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover' - uses: actions/upload-artifact@v4 if: always() name: "Upload test artifact" with: - name: specflowResults + name: gherkinResults path: | - artifactTests/specflow/**/*.xml - artifactTests/specflow/testResults/ + artifactTests/gherkin/**/*.xml + artifactTests/gherkin/testResults/ test-composite: name: Composite @@ -442,8 +445,8 @@ jobs: artifactTests/composite/**/*.xml artifactTests/composite/testResults/ - test-specflownunit: - name: SpecFlow NUnit + test-gherkinnunit: + name: Gherkin NUnit needs: waitOld runs-on: ubuntu-latest steps: @@ -458,15 +461,15 @@ jobs: - id: builder uses: ./.github/workflows/buildtest-action with: - bt-param: 'Framework/SpecFlowExtensionNUnitTests/SpecFlowExtensionNUnitTests.csproj --settings Framework/Parallel.RunSettings --logger trx --results-directory "${{github.workspace}}/artifactTests/specflownunit/testResults/" /p:CoverletOutput="${{github.workspace}}/artifactTests/specflownunit/" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover' + bt-param: 'Framework/GherkinExtensionNUnitTests/GherkinExtensionNUnitTests.csproj --settings Framework/Parallel.RunSettings --logger trx --results-directory "${{github.workspace}}/artifactTests/gherkinnunit/testResults/" /p:CoverletOutput="${{github.workspace}}/artifactTests/gherkinnunit/" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover' - uses: actions/upload-artifact@v4 if: always() name: "Upload test artifact" with: - name: specflownunitResults + name: gherkinnunitResults path: | - artifactTests/specflownunit/**/*.xml - artifactTests/specflownunit/testResults/ + artifactTests/gherkinnunit/**/*.xml + artifactTests/gherkinnunit/testResults/ test-selenpomlazy: name: Selenium POM and Lazy @@ -558,7 +561,7 @@ jobs: sonar: name: Sonar runs-on: windows-2022 - needs: [test-appium, test-winapp, test-untils, test-mongo, test-database, test-webservice, test-base, test-playwright, test-email, test-framework, test-specflow, test-specflownunit, test-composite, test-selenpomlazy, test-selenutil, test-selengen, getVersion] + needs: [test-appium, test-winapp, test-untils, test-mongo, test-database, test-webservice, test-base, test-playwright, test-email, test-framework, test-gherkin, test-gherkinnunit, test-composite, test-selenpomlazy, test-selenutil, test-selengen, getVersion] steps: - name: Set up JDK 17 uses: actions/setup-java@v1 @@ -636,7 +639,7 @@ jobs: report: name: Report runs-on: ubuntu-latest - needs: [test-appium, test-selengen, test-winapp, test-untils, test-mongo, test-database, test-webservice, test-base, test-playwright, test-email, test-framework, test-specflow, test-specflownunit, test-composite, test-selenpomlazy, test-selenutil, getVersion] + needs: [test-appium, test-selengen, test-winapp, test-untils, test-mongo, test-database, test-webservice, test-base, test-playwright, test-email, test-framework, test-gherkin, test-gherkinnunit, test-composite, test-selenpomlazy, test-selenutil, getVersion] if: always() steps: - uses: actions/checkout@v4 diff --git a/Docker/MAQSService/MainTestService/MainTestService.csproj b/Docker/MAQSService/MainTestService/MainTestService.csproj index 0a83e477b..e49e7962f 100644 --- a/Docker/MAQSService/MainTestService/MainTestService.csproj +++ b/Docker/MAQSService/MainTestService/MainTestService.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable Windows @@ -16,10 +16,10 @@ - - - - + + + + diff --git a/Docker/docker-compose.yml b/Docker/docker-compose.yml index 862e09969..10e10cc36 100644 --- a/Docker/docker-compose.yml +++ b/Docker/docker-compose.yml @@ -2,7 +2,7 @@ # Docker config files versioned 3 and higher. # If the version is bumped, this config file will have to change. # See https://github.com/moby/moby/issues/31101. -version: '2' +# version: '2' services: mssql: diff --git a/Framework/AppiumUnitTests/App.config b/Framework/AppiumUnitTests/App.config index 2eb1510eb..a35a96f1b 100644 --- a/Framework/AppiumUnitTests/App.config +++ b/Framework/AppiumUnitTests/App.config @@ -53,7 +53,7 @@ - + - - - + + diff --git a/Framework/DatabaseUnitTests/BaseFrameworkTests.cs b/Framework/DatabaseUnitTests/BaseFrameworkTests.cs index 47d723ab3..93e91c8c8 100644 --- a/Framework/DatabaseUnitTests/BaseFrameworkTests.cs +++ b/Framework/DatabaseUnitTests/BaseFrameworkTests.cs @@ -8,8 +8,10 @@ using OpenMAQS.Maqs.BaseTest; using OpenMAQS.Maqs.Utilities.Helper; using Microsoft.VisualStudio.TestTools.UnitTesting; +using MicroAssert = Microsoft.VisualStudio.TestTools.UnitTesting.Assert; using NUnit.Framework; using System.Diagnostics.CodeAnalysis; +using System; namespace DatabaseUnitTests { @@ -36,10 +38,10 @@ public class BaseFrameworkTests : BaseTestUnitTests.BaseFrameworkTests /// [TestMethod] [TestCategory(TestCategories.Framework)] - [ExpectedException(typeof(AssertFailedException))] + //[MyExpectedException(typeof(AssertFailedException))] public new void SoftAssertWithFailure() { - base.SoftAssertWithFailure(); + MicroAssert.Throws(() => base.SoftAssertWithFailure()); } /// diff --git a/Framework/DatabaseUnitTests/DatabaseConfigUnitTests.cs b/Framework/DatabaseUnitTests/DatabaseConfigUnitTests.cs index 5aa8cd831..70d543a51 100644 --- a/Framework/DatabaseUnitTests/DatabaseConfigUnitTests.cs +++ b/Framework/DatabaseUnitTests/DatabaseConfigUnitTests.cs @@ -28,7 +28,7 @@ public class DatabaseConfigUnitTests public void GetDatabaseConnectionStringTest() { string connection = DatabaseConfig.GetConnectionString(); - Assert.AreEqual("Data Source=localhost;Initial Catalog=GlobalAutomation;Persist Security Info=True;User ID=sa;Password=globalMAQS2;Connection Timeout=30", connection); + Assert.AreEqual("Data Source=localhost;Initial Catalog=GlobalAutomation;Persist Security Info=True;User ID=sa;Password=globalMAQS2;Connection Timeout=30;TrustServerCertificate=True", connection); } /// diff --git a/Framework/DatabaseUnitTests/DatabaseSQLiteUnitTestsWithDriver.cs b/Framework/DatabaseUnitTests/DatabaseSQLiteUnitTestsWithDriver.cs index 95fbb025c..ac463a280 100644 --- a/Framework/DatabaseUnitTests/DatabaseSQLiteUnitTestsWithDriver.cs +++ b/Framework/DatabaseUnitTests/DatabaseSQLiteUnitTestsWithDriver.cs @@ -243,13 +243,13 @@ INNER JOIN products p } [TestMethod] - [ExpectedException(typeof(SqliteException))] + //[MyExpectedException(typeof(SqliteException))] public void CustomQueryException() { - this.DatabaseDriver.Query((dbConnection) => + Assert.Throws(() => this.DatabaseDriver.Query((dbConnection) => { return dbConnection.Query("SELECT * FROM unknowntable"); - }); + })); } /// diff --git a/Framework/DatabaseUnitTests/DatabaseUnitTests.csproj b/Framework/DatabaseUnitTests/DatabaseUnitTests.csproj index 2f40ef7dc..05bff6d65 100644 --- a/Framework/DatabaseUnitTests/DatabaseUnitTests.csproj +++ b/Framework/DatabaseUnitTests/DatabaseUnitTests.csproj @@ -1,7 +1,7 @@ - + - net6.0 + net8.0 false @@ -11,19 +11,20 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - + + + + + - - - - + + + + diff --git a/Framework/DatabaseUnitTests/EventFiringDatabaseDriverTests.cs b/Framework/DatabaseUnitTests/EventFiringDatabaseDriverTests.cs index e613cce3b..9bcdd4cce 100644 --- a/Framework/DatabaseUnitTests/EventFiringDatabaseDriverTests.cs +++ b/Framework/DatabaseUnitTests/EventFiringDatabaseDriverTests.cs @@ -10,12 +10,13 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Data; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; using System.Diagnostics.CodeAnalysis; namespace DatabaseUnitTests { using global::DatabaseUnitTests.Models; + using Microsoft.Data.SqlClient; using System.Linq; /// @@ -61,10 +62,10 @@ public void EventFiringExecuteEventTest() /// [TestMethod] [TestCategory(TestCategories.Database)] - [ExpectedException(typeof(InvalidOperationException))] + //[MyExpectedException(typeof(InvalidOperationException))] public void ExecuteThrowException() { - this.Execute(null); + Assert.Throws(() => this.Execute(null)); } /// @@ -121,10 +122,10 @@ public void EventFiringQueryListEventTest() /// [TestMethod] [TestCategory(TestCategories.Database)] - [ExpectedException(typeof(InvalidOperationException))] + //[MyExpectedException(typeof(InvalidOperationException))] public void QueryListThrowException() { - this.Query(null); + Assert.Throws(() => this.Query(null)); } /// @@ -181,10 +182,10 @@ public void EventFiringQueryEventTest() /// [TestMethod] [TestCategory(TestCategories.Database)] - [ExpectedException(typeof(InvalidOperationException))] + //[MyExpectedException(typeof(InvalidOperationException))] public void QueryThrowException() { - this.Query((string)null); + Assert.Throws(() => this.Query((string)null)); } /// @@ -213,10 +214,10 @@ public void EventFiringQueryThrowExceptionEventTest() /// [TestMethod] [TestCategory(TestCategories.Database)] - [ExpectedException(typeof(SqlException))] + //[MyExpectedException(typeof(SqliteException))] public void InsertThrowException() { - this.Insert(null); + Assert.Throws(() => this.Insert(null)); } /// @@ -245,10 +246,10 @@ public void EventFiringInsertThrowExceptionEventTest() /// [TestMethod] [TestCategory(TestCategories.Database)] - [ExpectedException(typeof(ArgumentException))] + //[MyExpectedException(typeof(ArgumentException))] public void DeleteThrowException() { - this.Delete(null); + Assert.Throws(() => this.Delete(null)); } /// @@ -277,10 +278,10 @@ public void EventFiringDeleteThrowExceptionEventTest() /// [TestMethod] [TestCategory(TestCategories.Database)] - [ExpectedException(typeof(ArgumentException))] + //[MyExpectedException(typeof(ArgumentException))] public void UpdateThrowException() { - this.Update(null); + Assert.Throws(() => this.Update(null)); } /// diff --git a/Framework/DatabaseUnitTests/TestProvider.cs b/Framework/DatabaseUnitTests/TestProvider.cs index 50f0238d5..f0f0b2533 100644 --- a/Framework/DatabaseUnitTests/TestProvider.cs +++ b/Framework/DatabaseUnitTests/TestProvider.cs @@ -8,7 +8,7 @@ // -------------------------------------------------------------------------------------------------------------------- using OpenMAQS.Maqs.BaseDatabaseTest.Providers; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; namespace DatabaseUnitTests { @@ -21,7 +21,7 @@ public class TestProvider : IProvider /// Method used to setup a SQL connection client /// /// The connection string. - /// The connection client. + /// The connection client. public SqlConnection SetupDataBaseConnection(string connectionString) { SqlConnection connection = new SqlConnection diff --git a/Framework/EmailUnitTests/BaseFrameworkTests.cs b/Framework/EmailUnitTests/BaseFrameworkTests.cs index 29b4ea1b1..f3e4a8b6c 100644 --- a/Framework/EmailUnitTests/BaseFrameworkTests.cs +++ b/Framework/EmailUnitTests/BaseFrameworkTests.cs @@ -8,8 +8,10 @@ using OpenMAQS.Maqs.BaseTest; using OpenMAQS.Maqs.Utilities.Helper; using Microsoft.VisualStudio.TestTools.UnitTesting; +using MicroAssert=Microsoft.VisualStudio.TestTools.UnitTesting.Assert; using NUnit.Framework; using System.Diagnostics.CodeAnalysis; +using System; namespace EmailUnitTests { @@ -36,10 +38,10 @@ public class BaseFrameworkTests : BaseTestUnitTests.BaseFrameworkTests /// [TestMethod] [TestCategory(TestCategories.Framework)] - [ExpectedException(typeof(AssertFailedException))] + //[MyExpectedException(typeof(AssertFailedException))] public new void SoftAssertWithFailure() { - base.SoftAssertWithFailure(); + MicroAssert.Throws(() => base.SoftAssertWithFailure()); } /// diff --git a/Framework/EmailUnitTests/EmailUnitTests.csproj b/Framework/EmailUnitTests/EmailUnitTests.csproj index 9ffc204da..a083ffd12 100644 --- a/Framework/EmailUnitTests/EmailUnitTests.csproj +++ b/Framework/EmailUnitTests/EmailUnitTests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false @@ -21,18 +21,18 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - - - - + + + + + + + + diff --git a/Framework/EmailUnitTests/EmailUnitWithDriver.cs b/Framework/EmailUnitTests/EmailUnitWithDriver.cs index d7543c750..e87c5866a 100644 --- a/Framework/EmailUnitTests/EmailUnitWithDriver.cs +++ b/Framework/EmailUnitTests/EmailUnitWithDriver.cs @@ -895,7 +895,7 @@ private string GetFileHash(string filePath) { using (FileStream stream = File.OpenRead(filePath)) { - using (HashAlgorithm hashAlgorithm = new SHA1CryptoServiceProvider()) + using (HashAlgorithm hashAlgorithm = SHA1.Create()) { byte[] hashArray = hashAlgorithm.ComputeHash(stream); return BitConverter.ToString(hashArray); diff --git a/Framework/FrameworkUnitTests/DatabaseDriverManagerTests.cs b/Framework/FrameworkUnitTests/DatabaseDriverManagerTests.cs index 4de9616e4..508805c2d 100644 --- a/Framework/FrameworkUnitTests/DatabaseDriverManagerTests.cs +++ b/Framework/FrameworkUnitTests/DatabaseDriverManagerTests.cs @@ -26,22 +26,22 @@ public class DatabaseDriverManagerTests : BaseDatabaseTest /// Make sure we get the proper factory failure /// [TestMethod] - [ExpectedException(typeof(InvalidOperationException))] + //[ExpectedException(typeof(InvalidOperationException))] public void OracleFailure() { - this.TestObject.OverrideDatabaseDriver(ConnectionFactory.GetOpenConnection("Oracle", string.Empty)); - Assert.Fail("Get open connection should have thrown exception."); + Assert.Throws(() => this.TestObject.OverrideDatabaseDriver(ConnectionFactory.GetOpenConnection("Oracle", string.Empty))); + //Assert.Fail("Get open connection should have thrown exception."); } /// /// Make sure we get the proper factory failure /// [TestMethod] - [ExpectedException(typeof(ArgumentException))] + //[ExpectedException(typeof(ArgumentException))] public void InvalidTypeFailure() { - this.TestObject.OverrideDatabaseDriver(ConnectionFactory.GetOpenConnection("InvalidType", string.Empty)); - Assert.Fail("Get open connection should have thrown exception."); + Assert.Throws(() => this.TestObject.OverrideDatabaseDriver(ConnectionFactory.GetOpenConnection("InvalidType", string.Empty))); + //Assert.Fail("Get open connection should have thrown exception."); } /// @@ -60,11 +60,11 @@ public void OverrideWithPostGreSql() /// Make sure we get the proper factory failure /// [TestMethod] - [ExpectedException(typeof(ArgumentException))] + //[ExpectedException(typeof(ArgumentException))] public void OverideFactoryFailure() { - this.TestObject.OverrideDatabaseDriver(ConnectionFactory.GetOpenConnection(string.Empty, string.Empty)); - Assert.Fail("Get open connection should have thrown exception."); + Assert.Throws(() => this.TestObject.OverrideDatabaseDriver(ConnectionFactory.GetOpenConnection(string.Empty, string.Empty))); + //Assert.Fail("Get open connection should have thrown exception."); } /// diff --git a/Framework/FrameworkUnitTests/EmailDriverFailureTests.cs b/Framework/FrameworkUnitTests/EmailDriverFailureTests.cs index 26d668173..20d7f0c13 100644 --- a/Framework/FrameworkUnitTests/EmailDriverFailureTests.cs +++ b/Framework/FrameworkUnitTests/EmailDriverFailureTests.cs @@ -34,170 +34,170 @@ public void SetupMoqDriver() /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(TimeoutException))] + //[ExpectedException(typeof(TimeoutException))] public void MailBoxNamesError() { - EmailDriver.GetMailBoxNames(); + Assert.Throws(() => EmailDriver.GetMailBoxNames()); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(TimeoutException))] + //[ExpectedException(typeof(TimeoutException))] public void MailoxError() { - EmailDriver.GetMailbox(string.Empty); + Assert.Throws(() => EmailDriver.GetMailbox(string.Empty)); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(TimeoutException))] + //[ExpectedException(typeof(TimeoutException))] public void SelectBoxError() { - EmailDriver.SelectMailbox(string.Empty); + Assert.Throws(() => EmailDriver.SelectMailbox(string.Empty)); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(NullReferenceException))] + //[ExpectedException(typeof(NullReferenceException))] public void CreateMailboxError() { - EmailDriver.CreateMailbox(string.Empty); + Assert.Throws(() => EmailDriver.CreateMailbox(string.Empty)); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(FormatException))] + //[ExpectedException(typeof(FormatException))] public void GetMessageError() { - EmailDriver.GetMessage(string.Empty); + Assert.Throws(() => EmailDriver.GetMessage(string.Empty)); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(TimeoutException))] + //[ExpectedException(typeof(TimeoutException))] public void GetAllMessageHeadersError() { - EmailDriver.GetAllMessageHeaders(string.Empty); + Assert.Throws(() => EmailDriver.GetAllMessageHeaders(string.Empty)); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(NotImplementedException))] + //[ExpectedException(typeof(NotImplementedException))] public void DeleteMessageError() { - EmailDriver.DeleteMessage(string.Empty); + Assert.Throws(() => EmailDriver.DeleteMessage(string.Empty)); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(NotImplementedException))] + //[ExpectedException(typeof(NotImplementedException))] public void DeleteMimeMessageError() { - EmailDriver.DeleteMessage(new MimeMessage()); + Assert.Throws(() => EmailDriver.DeleteMessage(new MimeMessage())); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(NotImplementedException))] + //[ExpectedException(typeof(NotImplementedException))] public void MoveMimeMessageError() { - EmailDriver.MoveMailMessage(new MimeMessage(), string.Empty); + Assert.Throws(() => EmailDriver.MoveMailMessage(new MimeMessage(), string.Empty)); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(NotImplementedException))] + //[ExpectedException(typeof(NotImplementedException))] public void MoveMessageError() { - EmailDriver.MoveMailMessage(string.Empty, string.Empty); + Assert.Throws(() => EmailDriver.MoveMailMessage(string.Empty, string.Empty)); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(NotImplementedException))] + //[ExpectedException(typeof(NotImplementedException))] public void GetAttachmentsError() { - EmailDriver.GetAttachments(string.Empty); + Assert.Throws(() => EmailDriver.GetAttachments(string.Empty)); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(NotSupportedException))] + //[ExpectedException(typeof(NotSupportedException))] public void GetMimeAttachmentsError() { - EmailDriver.GetAttachments(EmailDriverMocks.GetMocMime()); + Assert.Throws(() => EmailDriver.GetAttachments(EmailDriverMocks.GetMocMime())); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(NotSupportedException))] + //[ExpectedException(typeof(NotSupportedException))] public void DownloadAttachmentsToError() { - EmailDriver.DownloadAttachments(EmailDriverMocks.GetMocMime(), string.Empty); + Assert.Throws(() => EmailDriver.DownloadAttachments(EmailDriverMocks.GetMocMime(), string.Empty)); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(NotSupportedException))] + //[ExpectedException(typeof(NotSupportedException))] public void DownloadAttachmentsError() { - EmailDriver.DownloadAttachments(EmailDriverMocks.GetMocMime()); + Assert.Throws(() => EmailDriver.DownloadAttachments(EmailDriverMocks.GetMocMime())); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(TimeoutException))] + //[ExpectedException(typeof(TimeoutException))] public void SearchMessagesError() { - EmailDriver.SearchMessages(null); + Assert.Throws(() => EmailDriver.SearchMessages(null)); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(NullReferenceException))] + //[ExpectedException(typeof(NullReferenceException))] public void GetContentTypesError() { - EmailDriver.GetContentTypes(null); + Assert.Throws(() => EmailDriver.GetContentTypes(null)); } /// /// Make sure email driver throws the correct exception /// [TestMethod] - [ExpectedException(typeof(NullReferenceException))] + //[ExpectedException(typeof(NullReferenceException))] public void GetBodyByContentTypesError() { - EmailDriver.GetBodyByContentTypes(null, string.Empty); + Assert.Throws(() => EmailDriver.GetBodyByContentTypes(null, string.Empty)); } } } diff --git a/Framework/FrameworkUnitTests/FrameworkUnitTests.csproj b/Framework/FrameworkUnitTests/FrameworkUnitTests.csproj index 341da421e..38e39706e 100644 --- a/Framework/FrameworkUnitTests/FrameworkUnitTests.csproj +++ b/Framework/FrameworkUnitTests/FrameworkUnitTests.csproj @@ -1,20 +1,20 @@ - net6.0 + net8.0 {D3E59B9F-445E-4484-9B2F-B3FE3ED82CE5} false false - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - - - + + + diff --git a/Framework/FrameworkUnitTests/MongoDriverFailureTests.cs b/Framework/FrameworkUnitTests/MongoDriverFailureTests.cs index 9f81c3220..83a9a21f3 100644 --- a/Framework/FrameworkUnitTests/MongoDriverFailureTests.cs +++ b/Framework/FrameworkUnitTests/MongoDriverFailureTests.cs @@ -25,30 +25,30 @@ public class MongoDriverFailureTests : BaseMongoTest /// Test driver call fails correctly /// [TestMethod] - [ExpectedException(typeof(TimeoutException))] + //[ExpectedException(typeof(TimeoutException))] public void ListAllCollectionItemsFailure() { - this.MongoDBDriver.ListAllCollectionItems(); + Assert.Throws(() => this.MongoDBDriver.ListAllCollectionItems()); } /// /// Test driver call fails correctly /// [TestMethod] - [ExpectedException(typeof(TimeoutException))] + //[ExpectedException(typeof(TimeoutException))] public void IsCollectionEmptyFailure() { - this.MongoDBDriver.IsCollectionEmpty(); + Assert.Throws(() => this.MongoDBDriver.IsCollectionEmpty()); } /// /// Test driver call fails correctly /// [TestMethod] - [ExpectedException(typeof(TimeoutException))] + //[ExpectedException(typeof(TimeoutException))] public void CountAllItemsInCollectionFailure() { - this.MongoDBDriver.CountAllItemsInCollection(); + Assert.Throws(() => this.MongoDBDriver.CountAllItemsInCollection()); } diff --git a/Framework/FrameworkUnitTests/MoqMailFolder.cs b/Framework/FrameworkUnitTests/MoqMailFolder.cs index c581e5cb4..5fcc4329b 100644 --- a/Framework/FrameworkUnitTests/MoqMailFolder.cs +++ b/Framework/FrameworkUnitTests/MoqMailFolder.cs @@ -77,6 +77,8 @@ class MoqMailFolder : IMailFolder public System.Collections.Generic.IReadOnlySet PermanentKeywords => throw new NotImplementedException(); public IReadOnlySet AcceptedKeywords => throw new NotImplementedException(); + + public bool CanOpen => throw new NotImplementedException(); #pragma warning disable 0067 public event EventHandler Opened; public event EventHandler Closed; diff --git a/Framework/SpecFlowExtension/AbstractTestSteps.cs b/Framework/GherkinExtension/AbstractTestSteps.cs similarity index 97% rename from Framework/SpecFlowExtension/AbstractTestSteps.cs rename to Framework/GherkinExtension/AbstractTestSteps.cs index d7efb02c1..57f19ba7b 100644 --- a/Framework/SpecFlowExtension/AbstractTestSteps.cs +++ b/Framework/GherkinExtension/AbstractTestSteps.cs @@ -6,9 +6,9 @@ //-------------------------------------------------- using OpenMAQS.Maqs.BaseTest; using System; -using TechTalk.SpecFlow; +using Reqnroll; -namespace OpenMAQS.Maqs.SpecFlow +namespace OpenMAQS.Maqs.Gherkin { /// /// The abstract TestSteps class definition diff --git a/Framework/SpecFlowExtension/ExtendableTestSteps.cs b/Framework/GherkinExtension/ExtendableTestSteps.cs similarity index 98% rename from Framework/SpecFlowExtension/ExtendableTestSteps.cs rename to Framework/GherkinExtension/ExtendableTestSteps.cs index e1d537c62..2cba34f44 100644 --- a/Framework/SpecFlowExtension/ExtendableTestSteps.cs +++ b/Framework/GherkinExtension/ExtendableTestSteps.cs @@ -9,9 +9,9 @@ using OpenMAQS.Maqs.Utilities.Performance; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; -using TechTalk.SpecFlow; +using Reqnroll; -namespace OpenMAQS.Maqs.SpecFlow +namespace OpenMAQS.Maqs.Gherkin { /// /// Abstract a TestSteps class diff --git a/Framework/SpecFlowExtension/SpecFlowExtension.csproj b/Framework/GherkinExtension/GherkinExtension.csproj similarity index 72% rename from Framework/SpecFlowExtension/SpecFlowExtension.csproj rename to Framework/GherkinExtension/GherkinExtension.csproj index 786ee5180..04bd0a397 100644 --- a/Framework/SpecFlowExtension/SpecFlowExtension.csproj +++ b/Framework/GherkinExtension/GherkinExtension.csproj @@ -6,24 +6,24 @@ - net6.0 - OpenMAQS.Maqs.SpecFlow - OpenMAQS.Maqs.SpecFlow - OpenMAQS.Maqs.SpecFlow - OpenMAQS.Maqs.SpecFlow + net8.0 + OpenMAQS.Maqs.Gherkin + OpenMAQS.Maqs.Gherkin + OpenMAQS.Maqs.Gherkin + OpenMAQS.Maqs.Gherkin MAQS.ico Gherkin Module true true OpenMAQS OpenMAQS - SpecFlow extension for Open MAQS' modular automation quick start + Gherkin extension for Open MAQS' modular automation quick start Copyright © OpenMAQS $([System.DateTime]::Now.Year) MIT MAQS.png https://raw.githubusercontent.com/OpenMAQS/maqs-dotnet/main/Framework/MAQS.png https://github.com/OpenMAQS/openmaqs-dotnet - test selenium appium automation NUnit MSTest TestFramework SpecFlow + test selenium appium automation NUnit MSTest TestFramework Gherkin true https://github.com/OpenMAQS/openmaqs-dotnet git @@ -43,23 +43,21 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + - - + + - - + + diff --git a/Framework/SpecFlowExtension/MAQS.ico b/Framework/GherkinExtension/MAQS.ico similarity index 100% rename from Framework/SpecFlowExtension/MAQS.ico rename to Framework/GherkinExtension/MAQS.ico diff --git a/Framework/SpecFlowExtension/TestSteps/BaseAppiumTestSteps.cs b/Framework/GherkinExtension/TestSteps/BaseAppiumTestSteps.cs similarity index 94% rename from Framework/SpecFlowExtension/TestSteps/BaseAppiumTestSteps.cs rename to Framework/GherkinExtension/TestSteps/BaseAppiumTestSteps.cs index e20b2036d..d1e3d396e 100644 --- a/Framework/SpecFlowExtension/TestSteps/BaseAppiumTestSteps.cs +++ b/Framework/GherkinExtension/TestSteps/BaseAppiumTestSteps.cs @@ -6,10 +6,10 @@ //-------------------------------------------------- using OpenMAQS.Maqs.BaseAppiumTest; using OpenQA.Selenium.Appium; -using TechTalk.SpecFlow; +using Reqnroll; using MaqsAppium = OpenMAQS.Maqs.BaseAppiumTest.BaseAppiumTest; -namespace OpenMAQS.Maqs.SpecFlow.TestSteps +namespace OpenMAQS.Maqs.Gherkin.TestSteps { /// /// Base for appium TestSteps classes diff --git a/Framework/SpecFlowExtension/TestSteps/BaseDatabaseTestSteps.cs b/Framework/GherkinExtension/TestSteps/BaseDatabaseTestSteps.cs similarity index 94% rename from Framework/SpecFlowExtension/TestSteps/BaseDatabaseTestSteps.cs rename to Framework/GherkinExtension/TestSteps/BaseDatabaseTestSteps.cs index 4741c714c..ed46e5bb9 100644 --- a/Framework/SpecFlowExtension/TestSteps/BaseDatabaseTestSteps.cs +++ b/Framework/GherkinExtension/TestSteps/BaseDatabaseTestSteps.cs @@ -5,10 +5,10 @@ // Base teststeps code for tests using databases //-------------------------------------------------- using OpenMAQS.Maqs.BaseDatabaseTest; -using TechTalk.SpecFlow; +using Reqnroll; using MaqsDatabase = OpenMAQS.Maqs.BaseDatabaseTest.BaseDatabaseTest; -namespace OpenMAQS.Maqs.SpecFlow.TestSteps +namespace OpenMAQS.Maqs.Gherkin.TestSteps { /// /// Base for database TestSteps classes diff --git a/Framework/SpecFlowExtension/TestSteps/BaseEmailTestSteps.cs b/Framework/GherkinExtension/TestSteps/BaseEmailTestSteps.cs similarity index 94% rename from Framework/SpecFlowExtension/TestSteps/BaseEmailTestSteps.cs rename to Framework/GherkinExtension/TestSteps/BaseEmailTestSteps.cs index 1a9b1b7e7..3dcc697ec 100644 --- a/Framework/SpecFlowExtension/TestSteps/BaseEmailTestSteps.cs +++ b/Framework/GherkinExtension/TestSteps/BaseEmailTestSteps.cs @@ -5,10 +5,10 @@ // Base teststeps code for tests using email //-------------------------------------------------- using OpenMAQS.Maqs.BaseEmailTest; -using TechTalk.SpecFlow; +using Reqnroll; using MaqsEmail = OpenMAQS.Maqs.BaseEmailTest.BaseEmailTest; -namespace OpenMAQS.Maqs.SpecFlow.TestSteps +namespace OpenMAQS.Maqs.Gherkin.TestSteps { /// /// Base for email TestSteps classes diff --git a/Framework/SpecFlowExtension/TestSteps/BasePlaywrightTestSteps.cs b/Framework/GherkinExtension/TestSteps/BasePlaywrightTestSteps.cs similarity index 94% rename from Framework/SpecFlowExtension/TestSteps/BasePlaywrightTestSteps.cs rename to Framework/GherkinExtension/TestSteps/BasePlaywrightTestSteps.cs index d529fd6b5..491ff2554 100644 --- a/Framework/SpecFlowExtension/TestSteps/BasePlaywrightTestSteps.cs +++ b/Framework/GherkinExtension/TestSteps/BasePlaywrightTestSteps.cs @@ -5,10 +5,10 @@ // Base teststeps code for tests using Playwright //-------------------------------------------------- using OpenMAQS.Maqs.BasePlaywrightTest; -using TechTalk.SpecFlow; +using Reqnroll; using MaqsPlaywright = OpenMAQS.Maqs.BasePlaywrightTest.BasePlaywrightTest; -namespace OpenMAQS.Maqs.SpecFlow.TestSteps +namespace OpenMAQS.Maqs.Gherkin.TestSteps { /// /// Base for Playwright TestSteps classes diff --git a/Framework/SpecFlowExtension/TestSteps/BaseSeleniumTestSteps.cs b/Framework/GherkinExtension/TestSteps/BaseSeleniumTestSteps.cs similarity index 94% rename from Framework/SpecFlowExtension/TestSteps/BaseSeleniumTestSteps.cs rename to Framework/GherkinExtension/TestSteps/BaseSeleniumTestSteps.cs index 73ac26781..3ebdcb950 100644 --- a/Framework/SpecFlowExtension/TestSteps/BaseSeleniumTestSteps.cs +++ b/Framework/GherkinExtension/TestSteps/BaseSeleniumTestSteps.cs @@ -6,10 +6,10 @@ //-------------------------------------------------- using OpenMAQS.Maqs.BaseSeleniumTest; using OpenQA.Selenium; -using TechTalk.SpecFlow; +using Reqnroll; using MaqsSelenium = OpenMAQS.Maqs.BaseSeleniumTest.BaseSeleniumTest; -namespace OpenMAQS.Maqs.SpecFlow.TestSteps +namespace OpenMAQS.Maqs.Gherkin.TestSteps { /// /// Base for selenium TestSteps classes diff --git a/Framework/SpecFlowExtension/TestSteps/BaseTestSteps.cs b/Framework/GherkinExtension/TestSteps/BaseTestSteps.cs similarity index 97% rename from Framework/SpecFlowExtension/TestSteps/BaseTestSteps.cs rename to Framework/GherkinExtension/TestSteps/BaseTestSteps.cs index b8fd555fd..e4778ff51 100644 --- a/Framework/SpecFlowExtension/TestSteps/BaseTestSteps.cs +++ b/Framework/GherkinExtension/TestSteps/BaseTestSteps.cs @@ -7,10 +7,10 @@ using OpenMAQS.Maqs.BaseTest; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; -using TechTalk.SpecFlow; +using Reqnroll; using MaqsBase = OpenMAQS.Maqs.BaseTest.BaseTest; -namespace OpenMAQS.Maqs.SpecFlow.TestSteps +namespace OpenMAQS.Maqs.Gherkin.TestSteps { /// /// Base for TestSteps classes diff --git a/Framework/SpecFlowExtension/TestSteps/BaseWebServiceTestSteps.cs b/Framework/GherkinExtension/TestSteps/BaseWebServiceTestSteps.cs similarity index 94% rename from Framework/SpecFlowExtension/TestSteps/BaseWebServiceTestSteps.cs rename to Framework/GherkinExtension/TestSteps/BaseWebServiceTestSteps.cs index 3c0e234db..23ca843da 100644 --- a/Framework/SpecFlowExtension/TestSteps/BaseWebServiceTestSteps.cs +++ b/Framework/GherkinExtension/TestSteps/BaseWebServiceTestSteps.cs @@ -5,10 +5,10 @@ // Base teststeps code for tests using web services //-------------------------------------------------- using OpenMAQS.Maqs.BaseWebServiceTest; -using TechTalk.SpecFlow; +using Reqnroll; using MaqsWeb = OpenMAQS.Maqs.BaseWebServiceTest.BaseWebServiceTest; -namespace OpenMAQS.Maqs.SpecFlow.TestSteps +namespace OpenMAQS.Maqs.Gherkin.TestSteps { /// /// Base for web service TestSteps classes diff --git a/Framework/SpecFlowExtensionNUnitTests/App.config b/Framework/GherkinExtensionNUnitTests/App.config similarity index 100% rename from Framework/SpecFlowExtensionNUnitTests/App.config rename to Framework/GherkinExtensionNUnitTests/App.config diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/AppiumFeature.feature b/Framework/GherkinExtensionNUnitTests/Features/AppiumFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionNUnitTests/Features/AppiumFeature.feature rename to Framework/GherkinExtensionNUnitTests/Features/AppiumFeature.feature diff --git a/Framework/GherkinExtensionNUnitTests/Features/AppiumFeature.feature.cs b/Framework/GherkinExtensionNUnitTests/Features/AppiumFeature.feature.cs new file mode 100644 index 000000000..5a3e6288a --- /dev/null +++ b/Framework/GherkinExtensionNUnitTests/Features/AppiumFeature.feature.cs @@ -0,0 +1,167 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtensionNUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class AppiumFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "AppiumFeature", "\tAppium Tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "AppiumFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/AppiumFeature.feature.ndjson", 3); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("Driver in BaseAppiumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BaseAppiumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "AppiumFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Appium")] + public async global::System.Threading.Tasks.Task DriverInBaseAppiumTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Appium"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Driver in BaseAppiumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseAppiumTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BaseAppiumTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("TestObject is type AppiumTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden +#line 9 + await testRunner.AndAsync("BaseAppiumTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden +#line 10 + await testRunner.AndAsync("BaseAppiumTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/DatabaseFeature.feature b/Framework/GherkinExtensionNUnitTests/Features/DatabaseFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionNUnitTests/Features/DatabaseFeature.feature rename to Framework/GherkinExtensionNUnitTests/Features/DatabaseFeature.feature diff --git a/Framework/GherkinExtensionNUnitTests/Features/DatabaseFeature.feature.cs b/Framework/GherkinExtensionNUnitTests/Features/DatabaseFeature.feature.cs new file mode 100644 index 000000000..e9d6a190a --- /dev/null +++ b/Framework/GherkinExtensionNUnitTests/Features/DatabaseFeature.feature.cs @@ -0,0 +1,161 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtensionNUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class DatabaseFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "DatabaseFeature", "\tDatabase Tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "DatabaseFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/DatabaseFeature.feature.ndjson", 3); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("DatabaseDriver Available BaseDatabaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("DatabaseDriver Available BaseDatabaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "DatabaseFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Database")] + public async global::System.Threading.Tasks.Task DatabaseDriverAvailableBaseDatabaseTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Database"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("DatabaseDriver Available BaseDatabaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseDatabaseTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("DatabaseDriver is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("DatabaseDriver is type DatabaseConnectionDriver", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/EmailFeature.feature b/Framework/GherkinExtensionNUnitTests/Features/EmailFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionNUnitTests/Features/EmailFeature.feature rename to Framework/GherkinExtensionNUnitTests/Features/EmailFeature.feature diff --git a/Framework/GherkinExtensionNUnitTests/Features/EmailFeature.feature.cs b/Framework/GherkinExtensionNUnitTests/Features/EmailFeature.feature.cs new file mode 100644 index 000000000..7e3571c6f --- /dev/null +++ b/Framework/GherkinExtensionNUnitTests/Features/EmailFeature.feature.cs @@ -0,0 +1,164 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtensionNUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class EmailFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "EmailFeature", "\tEmail Tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "EmailFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/EmailFeature.feature.ndjson", 3); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("EmailDriver Available BaseEmailTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("EmailDriver Available BaseEmailTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "EmailFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Email")] + public async global::System.Threading.Tasks.Task EmailDriverAvailableBaseEmailTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Email"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("EmailDriver Available BaseEmailTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseEmailTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BaseEmailTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("TestObject is type EmailTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden +#line 9 + await testRunner.AndAsync("BaseEmailTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/PlaywrightFeature.feature b/Framework/GherkinExtensionNUnitTests/Features/PlaywrightFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionNUnitTests/Features/PlaywrightFeature.feature rename to Framework/GherkinExtensionNUnitTests/Features/PlaywrightFeature.feature diff --git a/Framework/GherkinExtensionNUnitTests/Features/PlaywrightFeature.feature.cs b/Framework/GherkinExtensionNUnitTests/Features/PlaywrightFeature.feature.cs new file mode 100644 index 000000000..c69229010 --- /dev/null +++ b/Framework/GherkinExtensionNUnitTests/Features/PlaywrightFeature.feature.cs @@ -0,0 +1,170 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtensionNUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class PlaywrightFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "PlaywrightFeature", "\tPlaywright Tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "PlaywrightFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/PlaywrightFeature.feature.ndjson", 3); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("Driver in BasePlaywrightTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BasePlaywrightTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "PlaywrightFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Playwright")] + public async global::System.Threading.Tasks.Task DriverInBasePlaywrightTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Playwright"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Driver in BasePlaywrightTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BasePlaywrightTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BasePlaywrightTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("TestObject is type PlaywrightTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden +#line 9 + await testRunner.AndAsync("BasePlaywrightTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden +#line 10 + await testRunner.AndAsync("BasePlaywrightTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden +#line 11 + await testRunner.AndAsync("BasePlaywrightTestSteps Null driver is null", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/ScenarioContextFeature.feature b/Framework/GherkinExtensionNUnitTests/Features/ScenarioContextFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionNUnitTests/Features/ScenarioContextFeature.feature rename to Framework/GherkinExtensionNUnitTests/Features/ScenarioContextFeature.feature diff --git a/Framework/GherkinExtensionNUnitTests/Features/ScenarioContextFeature.feature.cs b/Framework/GherkinExtensionNUnitTests/Features/ScenarioContextFeature.feature.cs new file mode 100644 index 000000000..ad7978cb1 --- /dev/null +++ b/Framework/GherkinExtensionNUnitTests/Features/ScenarioContextFeature.feature.cs @@ -0,0 +1,305 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtensionNUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class ScenarioContextFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "ScenarioContextFeature", "\tScenarioContext tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "ScenarioContextFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/ScenarioContextFeature.feature.ndjson", 7); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("ScenarioContext Available BaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("ScenarioContext Available BaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_General")] + public async global::System.Threading.Tasks.Task ScenarioContextAvailableBaseTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_General"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("ScenarioContext Available BaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BaseTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("ScenarioContext Available BaseSeleniumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("ScenarioContext Available BaseSeleniumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Selenium")] + public async global::System.Threading.Tasks.Task ScenarioContextAvailableBaseSeleniumTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Selenium"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "1"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("ScenarioContext Available BaseSeleniumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 11 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 12 + await testRunner.GivenAsync("class BaseSeleniumTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 13 + await testRunner.ThenAsync("BaseSeleniumTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 14 + await testRunner.AndAsync("BaseSeleniumTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("ScenarioContext Available BaseWebServiceTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("ScenarioContext Available BaseWebServiceTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_WebService")] + public async global::System.Threading.Tasks.Task ScenarioContextAvailableBaseWebServiceTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_WebService"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "2"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("ScenarioContext Available BaseWebServiceTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 17 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 18 + await testRunner.GivenAsync("class BaseWebServiceTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 19 + await testRunner.ThenAsync("BaseWebServiceTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 20 + await testRunner.AndAsync("BaseWebServiceTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("ScenarioContext Available BaseEmailTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("ScenarioContext Available BaseEmailTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Email")] + public async global::System.Threading.Tasks.Task ScenarioContextAvailableBaseEmailTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Email"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "3"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("ScenarioContext Available BaseEmailTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 23 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 24 + await testRunner.GivenAsync("class BaseEmailTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 25 + await testRunner.ThenAsync("BaseEmailTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 26 + await testRunner.AndAsync("BaseEmailTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("ScenarioContext Available BaseDatabaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("ScenarioContext Available BaseDatabaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Database")] + public async global::System.Threading.Tasks.Task ScenarioContextAvailableBaseDatabaseTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Database"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "4"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("ScenarioContext Available BaseDatabaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 29 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 30 + await testRunner.GivenAsync("class BaseDatabaseTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 31 + await testRunner.ThenAsync("BaseDatabaseTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 32 + await testRunner.AndAsync("BaseDatabaseTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/SeleniumFeature.feature b/Framework/GherkinExtensionNUnitTests/Features/SeleniumFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionNUnitTests/Features/SeleniumFeature.feature rename to Framework/GherkinExtensionNUnitTests/Features/SeleniumFeature.feature diff --git a/Framework/GherkinExtensionNUnitTests/Features/SeleniumFeature.feature.cs b/Framework/GherkinExtensionNUnitTests/Features/SeleniumFeature.feature.cs new file mode 100644 index 000000000..9f16b362b --- /dev/null +++ b/Framework/GherkinExtensionNUnitTests/Features/SeleniumFeature.feature.cs @@ -0,0 +1,161 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtensionNUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class SeleniumFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "SeleniumFeature", "\tSelenium Tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "SeleniumFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/SeleniumFeature.feature.ndjson", 3); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("WebDriver Available BaseSeleniumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("WebDriver Available BaseSeleniumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "SeleniumFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Selenium")] + public async global::System.Threading.Tasks.Task WebDriverAvailableBaseSeleniumTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Selenium"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("WebDriver Available BaseSeleniumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseSeleniumTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BaseSeleniumTestSteps WebDriver is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("WebDriver is type EventFiringWebDriver", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/TestObjectFeature.feature b/Framework/GherkinExtensionNUnitTests/Features/TestObjectFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionNUnitTests/Features/TestObjectFeature.feature rename to Framework/GherkinExtensionNUnitTests/Features/TestObjectFeature.feature diff --git a/Framework/GherkinExtensionNUnitTests/Features/TestObjectFeature.feature.cs b/Framework/GherkinExtensionNUnitTests/Features/TestObjectFeature.feature.cs new file mode 100644 index 000000000..abdc94ba1 --- /dev/null +++ b/Framework/GherkinExtensionNUnitTests/Features/TestObjectFeature.feature.cs @@ -0,0 +1,305 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtensionNUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class TestObjectFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "TestObjectFeature", "\tTestObject is available", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "TestObjectFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/TestObjectFeature.feature.ndjson", 7); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("TestObject Available BaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject Available BaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_General")] + public async global::System.Threading.Tasks.Task TestObjectAvailableBaseTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_General"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("TestObject Available BaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BaseTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("TestObject is type BaseTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("TestObject Available BaseSeleniumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject Available BaseSeleniumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Selenium")] + public async global::System.Threading.Tasks.Task TestObjectAvailableBaseSeleniumTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Selenium"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "1"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("TestObject Available BaseSeleniumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 11 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 12 + await testRunner.GivenAsync("class BaseSeleniumTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 13 + await testRunner.ThenAsync("BaseSeleniumTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 14 + await testRunner.AndAsync("TestObject is type ISeleniumTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("TestObject Available BaseWebServiceTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject Available BaseWebServiceTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_WebService")] + public async global::System.Threading.Tasks.Task TestObjectAvailableBaseWebServiceTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_WebService"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "2"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("TestObject Available BaseWebServiceTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 17 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 18 + await testRunner.GivenAsync("class BaseWebServiceTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 19 + await testRunner.ThenAsync("BaseWebServiceTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 20 + await testRunner.AndAsync("TestObject is type WebServiceTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("TestObject Available BaseEmailTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject Available BaseEmailTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Email")] + public async global::System.Threading.Tasks.Task TestObjectAvailableBaseEmailTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Email"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "3"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("TestObject Available BaseEmailTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 23 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 24 + await testRunner.GivenAsync("class BaseEmailTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 25 + await testRunner.ThenAsync("BaseEmailTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 26 + await testRunner.AndAsync("TestObject is type EmailTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("TestObject Available BaseDatabaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject Available BaseDatabaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Database")] + public async global::System.Threading.Tasks.Task TestObjectAvailableBaseDatabaseTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Database"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "4"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("TestObject Available BaseDatabaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 29 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 30 + await testRunner.GivenAsync("class BaseDatabaseTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 31 + await testRunner.ThenAsync("BaseDatabaseTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 32 + await testRunner.AndAsync("TestObject is type DatabaseTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/WebServiceFeature.feature b/Framework/GherkinExtensionNUnitTests/Features/WebServiceFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionNUnitTests/Features/WebServiceFeature.feature rename to Framework/GherkinExtensionNUnitTests/Features/WebServiceFeature.feature diff --git a/Framework/GherkinExtensionNUnitTests/Features/WebServiceFeature.feature.cs b/Framework/GherkinExtensionNUnitTests/Features/WebServiceFeature.feature.cs new file mode 100644 index 000000000..df13ccce6 --- /dev/null +++ b/Framework/GherkinExtensionNUnitTests/Features/WebServiceFeature.feature.cs @@ -0,0 +1,161 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtensionNUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class WebServiceFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "WebServiceFeature", "\tWeb Service Tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "WebServiceFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/WebServiceFeature.feature.ndjson", 3); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("WebServiceDriver Available BaseWebServiceTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("WebServiceDriver Available BaseWebServiceTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "WebServiceFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_WebService")] + public async global::System.Threading.Tasks.Task WebServiceDriverAvailableBaseWebServiceTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_WebService"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("WebServiceDriver Available BaseWebServiceTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseWebServiceTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BaseWebServiceTestSteps WebServiceDriver is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("BaseWebServiceTestSteps WebServiceDriver is type EventFiringWebServiceDriver", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/SpecFlowExtensionUnitTests.csproj b/Framework/GherkinExtensionNUnitTests/GherkinExtensionNUnitTests.csproj similarity index 69% rename from Framework/SpecFlowExtensionUnitTests/SpecFlowExtensionUnitTests.csproj rename to Framework/GherkinExtensionNUnitTests/GherkinExtensionNUnitTests.csproj index 1f764f32e..3222e0376 100644 --- a/Framework/SpecFlowExtensionUnitTests/SpecFlowExtensionUnitTests.csproj +++ b/Framework/GherkinExtensionNUnitTests/GherkinExtensionNUnitTests.csproj @@ -1,35 +1,39 @@ - net6.0 + net8.0 false - SpecFlowExtUnitTests + GherkinExtensionNUnitTests - SpecFlowExtUnitTests + GherkinExtensionNUnitTests + + true + true - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - - - - - - - + + + + + + + + + + + + - + @@ -40,13 +44,9 @@ - - AppiumFeature.feature - - - - - + + $(UsingMicrosoftNETSdk) + %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) SpecFlowSingleFileGenerator @@ -54,12 +54,10 @@ %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) SpecFlowSingleFileGenerator - + SpecFlowSingleFileGenerator - - $(UsingMicrosoftNETSdk) - %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) + SpecFlowSingleFileGenerator diff --git a/Framework/SpecFlowExtensionNUnitTests/Steps/AppiumUnitTestSteps.cs b/Framework/GherkinExtensionNUnitTests/Steps/AppiumUnitTestSteps.cs similarity index 95% rename from Framework/SpecFlowExtensionNUnitTests/Steps/AppiumUnitTestSteps.cs rename to Framework/GherkinExtensionNUnitTests/Steps/AppiumUnitTestSteps.cs index 5b5f3ec69..6df5a9240 100644 --- a/Framework/SpecFlowExtensionNUnitTests/Steps/AppiumUnitTestSteps.cs +++ b/Framework/GherkinExtensionNUnitTests/Steps/AppiumUnitTestSteps.cs @@ -5,11 +5,11 @@ // TestSteps class that inherits from BaseAppiumTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BaseAppiumTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using NUnit.Framework; -using TechTalk.SpecFlow; +using Reqnroll; -namespace SpecFlowExtensionNUnitTests.Steps +namespace GherkinExtensionNUnitTests.Steps { /// /// BaseAppium unit test steps diff --git a/Framework/SpecFlowExtensionNUnitTests/Steps/BaseUnitTestSteps.cs b/Framework/GherkinExtensionNUnitTests/Steps/BaseUnitTestSteps.cs similarity index 95% rename from Framework/SpecFlowExtensionNUnitTests/Steps/BaseUnitTestSteps.cs rename to Framework/GherkinExtensionNUnitTests/Steps/BaseUnitTestSteps.cs index 3156d3956..0c59d9f73 100644 --- a/Framework/SpecFlowExtensionNUnitTests/Steps/BaseUnitTestSteps.cs +++ b/Framework/GherkinExtensionNUnitTests/Steps/BaseUnitTestSteps.cs @@ -5,11 +5,11 @@ // TestSteps class that inherits from BaseTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BaseTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using NUnit.Framework; -using TechTalk.SpecFlow; +using Reqnroll; -namespace SpecFlowExtensionNUnitTests.Steps +namespace GherkinExtensionNUnitTests.Steps { /// /// Base unit test steps diff --git a/Framework/SpecFlowExtensionNUnitTests/Steps/DatabaseUnitTestSteps.cs b/Framework/GherkinExtensionNUnitTests/Steps/DatabaseUnitTestSteps.cs similarity index 96% rename from Framework/SpecFlowExtensionNUnitTests/Steps/DatabaseUnitTestSteps.cs rename to Framework/GherkinExtensionNUnitTests/Steps/DatabaseUnitTestSteps.cs index efe5e4510..9c17e32aa 100644 --- a/Framework/SpecFlowExtensionNUnitTests/Steps/DatabaseUnitTestSteps.cs +++ b/Framework/GherkinExtensionNUnitTests/Steps/DatabaseUnitTestSteps.cs @@ -5,11 +5,11 @@ // TestSteps class that inherits from BaseEmailTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BaseDatabaseTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using NUnit.Framework; -using TechTalk.SpecFlow; +using Reqnroll; -namespace SpecFlowExtensionNUnitTests.Steps +namespace GherkinExtensionNUnitTests.Steps { /// /// BaseDatabase unit test steps diff --git a/Framework/SpecFlowExtensionNUnitTests/Steps/EmailUnitTestSteps.cs b/Framework/GherkinExtensionNUnitTests/Steps/EmailUnitTestSteps.cs similarity index 95% rename from Framework/SpecFlowExtensionNUnitTests/Steps/EmailUnitTestSteps.cs rename to Framework/GherkinExtensionNUnitTests/Steps/EmailUnitTestSteps.cs index b35f69557..25ab9f863 100644 --- a/Framework/SpecFlowExtensionNUnitTests/Steps/EmailUnitTestSteps.cs +++ b/Framework/GherkinExtensionNUnitTests/Steps/EmailUnitTestSteps.cs @@ -5,11 +5,11 @@ // TestSteps class that inherits from BaseEmailTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BaseEmailTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using NUnit.Framework; -using TechTalk.SpecFlow; +using Reqnroll; -namespace SpecFlowExtensionNUnitTests.Steps +namespace GherkinExtensionNUnitTests.Steps { /// /// BaseEmail unit test steps diff --git a/Framework/SpecFlowExtensionUnitTests/Steps/PlaywrightUnitTestSteps.cs b/Framework/GherkinExtensionNUnitTests/Steps/PlaywrightUnitTestSteps.cs similarity index 96% rename from Framework/SpecFlowExtensionUnitTests/Steps/PlaywrightUnitTestSteps.cs rename to Framework/GherkinExtensionNUnitTests/Steps/PlaywrightUnitTestSteps.cs index 266a5c5af..ac618189e 100644 --- a/Framework/SpecFlowExtensionUnitTests/Steps/PlaywrightUnitTestSteps.cs +++ b/Framework/GherkinExtensionNUnitTests/Steps/PlaywrightUnitTestSteps.cs @@ -5,12 +5,12 @@ // TestSteps class that inherits from BasePlaywrightTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BasePlaywrightTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using NUnit.Framework; using System; -using TechTalk.SpecFlow; +using Reqnroll; -namespace SpecFlowExtensionNUnitTests.Steps +namespace GherkinExtensionNUnitTests.Steps { /// /// BasePlaywright unit test steps diff --git a/Framework/SpecFlowExtensionNUnitTests/Steps/SeleniumUnitTestSteps.cs b/Framework/GherkinExtensionNUnitTests/Steps/SeleniumUnitTestSteps.cs similarity index 96% rename from Framework/SpecFlowExtensionNUnitTests/Steps/SeleniumUnitTestSteps.cs rename to Framework/GherkinExtensionNUnitTests/Steps/SeleniumUnitTestSteps.cs index 394fe0045..c7bc578ee 100644 --- a/Framework/SpecFlowExtensionNUnitTests/Steps/SeleniumUnitTestSteps.cs +++ b/Framework/GherkinExtensionNUnitTests/Steps/SeleniumUnitTestSteps.cs @@ -5,12 +5,12 @@ // TestSteps class that inherits from BaseSeleniumTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BaseSeleniumTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using NUnit.Framework; using OpenQA.Selenium.Support.Events; -using TechTalk.SpecFlow; +using Reqnroll; -namespace SpecFlowExtensionNUnitTests.Steps +namespace GherkinExtensionNUnitTests.Steps { /// /// BaseSelenium unit test steps diff --git a/Framework/SpecFlowExtensionNUnitTests/Steps/WebServiceUnitTestSteps.cs b/Framework/GherkinExtensionNUnitTests/Steps/WebServiceUnitTestSteps.cs similarity index 96% rename from Framework/SpecFlowExtensionNUnitTests/Steps/WebServiceUnitTestSteps.cs rename to Framework/GherkinExtensionNUnitTests/Steps/WebServiceUnitTestSteps.cs index 07a0577c7..135911ccf 100644 --- a/Framework/SpecFlowExtensionNUnitTests/Steps/WebServiceUnitTestSteps.cs +++ b/Framework/GherkinExtensionNUnitTests/Steps/WebServiceUnitTestSteps.cs @@ -5,11 +5,11 @@ // TestSteps class that inherits from BaseWebServiceTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BaseWebServiceTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using NUnit.Framework; -using TechTalk.SpecFlow; +using Reqnroll; -namespace SpecFlowExtensionNUnitTests.Steps +namespace GherkinExtensionNUnitTests.Steps { /// /// BaseWebService unit test steps diff --git a/Framework/SpecFlowExtensionUnitTests/App.config b/Framework/GherkinExtensionUnitTests/App.config similarity index 100% rename from Framework/SpecFlowExtensionUnitTests/App.config rename to Framework/GherkinExtensionUnitTests/App.config diff --git a/Framework/SpecFlowExtensionUnitTests/Features/AppiumFeature.feature b/Framework/GherkinExtensionUnitTests/Features/AppiumFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionUnitTests/Features/AppiumFeature.feature rename to Framework/GherkinExtensionUnitTests/Features/AppiumFeature.feature diff --git a/Framework/GherkinExtensionUnitTests/Features/AppiumFeature.feature.cs b/Framework/GherkinExtensionUnitTests/Features/AppiumFeature.feature.cs new file mode 100644 index 000000000..805ca0dde --- /dev/null +++ b/Framework/GherkinExtensionUnitTests/Features/AppiumFeature.feature.cs @@ -0,0 +1,167 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class AppiumFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "AppiumFeature", "\tAppium Tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "AppiumFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/AppiumFeature.feature.ndjson", 3); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("Driver in BaseAppiumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BaseAppiumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "AppiumFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Appium")] + public async global::System.Threading.Tasks.Task DriverInBaseAppiumTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Appium"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Driver in BaseAppiumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseAppiumTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BaseAppiumTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("TestObject is type AppiumTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden +#line 9 + await testRunner.AndAsync("BaseAppiumTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden +#line 10 + await testRunner.AndAsync("BaseAppiumTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/DatabaseFeature.feature b/Framework/GherkinExtensionUnitTests/Features/DatabaseFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionUnitTests/Features/DatabaseFeature.feature rename to Framework/GherkinExtensionUnitTests/Features/DatabaseFeature.feature diff --git a/Framework/GherkinExtensionUnitTests/Features/DatabaseFeature.feature.cs b/Framework/GherkinExtensionUnitTests/Features/DatabaseFeature.feature.cs new file mode 100644 index 000000000..b4d0aae21 --- /dev/null +++ b/Framework/GherkinExtensionUnitTests/Features/DatabaseFeature.feature.cs @@ -0,0 +1,161 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class DatabaseFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "DatabaseFeature", "\tDatabase Tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "DatabaseFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/DatabaseFeature.feature.ndjson", 3); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("Driver in BaseDatabaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BaseDatabaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "DatabaseFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Database")] + public async global::System.Threading.Tasks.Task DriverInBaseDatabaseTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Database"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Driver in BaseDatabaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseDatabaseTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("DatabaseDriver is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("DatabaseDriver is type DatabaseConnectionDriver", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/EmailFeature.feature b/Framework/GherkinExtensionUnitTests/Features/EmailFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionUnitTests/Features/EmailFeature.feature rename to Framework/GherkinExtensionUnitTests/Features/EmailFeature.feature diff --git a/Framework/GherkinExtensionUnitTests/Features/EmailFeature.feature.cs b/Framework/GherkinExtensionUnitTests/Features/EmailFeature.feature.cs new file mode 100644 index 000000000..8cce1ebd9 --- /dev/null +++ b/Framework/GherkinExtensionUnitTests/Features/EmailFeature.feature.cs @@ -0,0 +1,167 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class EmailFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "EmailFeature", "\tEmail Tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "EmailFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/EmailFeature.feature.ndjson", 3); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("Driver in BaseEmailTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BaseEmailTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "EmailFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Email")] + public async global::System.Threading.Tasks.Task DriverInBaseEmailTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Email"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Driver in BaseEmailTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseEmailTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BaseEmailTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("TestObject is type EmailTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden +#line 9 + await testRunner.AndAsync("BaseEmailTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden +#line 10 + await testRunner.AndAsync("BaseEmailTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/PlaywrightFeature.feature b/Framework/GherkinExtensionUnitTests/Features/PlaywrightFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionUnitTests/Features/PlaywrightFeature.feature rename to Framework/GherkinExtensionUnitTests/Features/PlaywrightFeature.feature diff --git a/Framework/GherkinExtensionUnitTests/Features/PlaywrightFeature.feature.cs b/Framework/GherkinExtensionUnitTests/Features/PlaywrightFeature.feature.cs new file mode 100644 index 000000000..814975336 --- /dev/null +++ b/Framework/GherkinExtensionUnitTests/Features/PlaywrightFeature.feature.cs @@ -0,0 +1,170 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class PlaywrightFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "PlaywrightFeature", "\tPlaywright Tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "PlaywrightFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/PlaywrightFeature.feature.ndjson", 3); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("Driver in BasePlaywrightTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BasePlaywrightTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "PlaywrightFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Playwright")] + public async global::System.Threading.Tasks.Task DriverInBasePlaywrightTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Playwright"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Driver in BasePlaywrightTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BasePlaywrightTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BasePlaywrightTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("TestObject is type PlaywrightTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden +#line 9 + await testRunner.AndAsync("BasePlaywrightTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden +#line 10 + await testRunner.AndAsync("BasePlaywrightTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden +#line 11 + await testRunner.AndAsync("BasePlaywrightTestSteps Null driver is null", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/ScenarioContextFeature.feature b/Framework/GherkinExtensionUnitTests/Features/ScenarioContextFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionUnitTests/Features/ScenarioContextFeature.feature rename to Framework/GherkinExtensionUnitTests/Features/ScenarioContextFeature.feature diff --git a/Framework/GherkinExtensionUnitTests/Features/ScenarioContextFeature.feature.cs b/Framework/GherkinExtensionUnitTests/Features/ScenarioContextFeature.feature.cs new file mode 100644 index 000000000..bcdea52a0 --- /dev/null +++ b/Framework/GherkinExtensionUnitTests/Features/ScenarioContextFeature.feature.cs @@ -0,0 +1,305 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class ScenarioContextFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "ScenarioContextFeature", "\tScenarioContext tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "ScenarioContextFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/ScenarioContextFeature.feature.ndjson", 7); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("Context in BaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Context in BaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_General")] + public async global::System.Threading.Tasks.Task ContextInBaseTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_General"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Context in BaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BaseTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("Context in BaseSeleniumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Context in BaseSeleniumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Selenium")] + public async global::System.Threading.Tasks.Task ContextInBaseSeleniumTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Selenium"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "1"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Context in BaseSeleniumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 11 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 12 + await testRunner.GivenAsync("class BaseSeleniumTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 13 + await testRunner.ThenAsync("BaseSeleniumTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 14 + await testRunner.AndAsync("BaseSeleniumTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("Context in BaseWebServiceTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Context in BaseWebServiceTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_WebService")] + public async global::System.Threading.Tasks.Task ContextInBaseWebServiceTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_WebService"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "2"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Context in BaseWebServiceTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 17 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 18 + await testRunner.GivenAsync("class BaseWebServiceTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 19 + await testRunner.ThenAsync("BaseWebServiceTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 20 + await testRunner.AndAsync("BaseWebServiceTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("Context in BaseEmailTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Context in BaseEmailTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Email")] + public async global::System.Threading.Tasks.Task ContextInBaseEmailTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Email"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "3"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Context in BaseEmailTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 23 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 24 + await testRunner.GivenAsync("class BaseEmailTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 25 + await testRunner.ThenAsync("BaseEmailTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 26 + await testRunner.AndAsync("BaseEmailTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("Context in BaseDatabaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Context in BaseDatabaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Database")] + public async global::System.Threading.Tasks.Task ContextInBaseDatabaseTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Database"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "4"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Context in BaseDatabaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 29 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 30 + await testRunner.GivenAsync("class BaseDatabaseTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 31 + await testRunner.ThenAsync("BaseDatabaseTestSteps ScenarioContext is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 32 + await testRunner.AndAsync("BaseDatabaseTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/SeleniumFeature.feature b/Framework/GherkinExtensionUnitTests/Features/SeleniumFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionUnitTests/Features/SeleniumFeature.feature rename to Framework/GherkinExtensionUnitTests/Features/SeleniumFeature.feature diff --git a/Framework/GherkinExtensionUnitTests/Features/SeleniumFeature.feature.cs b/Framework/GherkinExtensionUnitTests/Features/SeleniumFeature.feature.cs new file mode 100644 index 000000000..eeaf4b17e --- /dev/null +++ b/Framework/GherkinExtensionUnitTests/Features/SeleniumFeature.feature.cs @@ -0,0 +1,161 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class SeleniumFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "SeleniumFeature", "\tSelenium Tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "SeleniumFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/SeleniumFeature.feature.ndjson", 3); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("Driver in BaseSeleniumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BaseSeleniumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "SeleniumFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Selenium")] + public async global::System.Threading.Tasks.Task DriverInBaseSeleniumTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Selenium"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Driver in BaseSeleniumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseSeleniumTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BaseSeleniumTestSteps WebDriver is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("WebDriver is type EventFiringWebDriver", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/TestObjectFeature.feature b/Framework/GherkinExtensionUnitTests/Features/TestObjectFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionUnitTests/Features/TestObjectFeature.feature rename to Framework/GherkinExtensionUnitTests/Features/TestObjectFeature.feature diff --git a/Framework/GherkinExtensionUnitTests/Features/TestObjectFeature.feature.cs b/Framework/GherkinExtensionUnitTests/Features/TestObjectFeature.feature.cs new file mode 100644 index 000000000..70d5dded9 --- /dev/null +++ b/Framework/GherkinExtensionUnitTests/Features/TestObjectFeature.feature.cs @@ -0,0 +1,305 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class TestObjectFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "TestObjectFeature", "\tTestObject is available", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "TestObjectFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/TestObjectFeature.feature.ndjson", 7); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("TestObject in BaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject in BaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_General")] + public async global::System.Threading.Tasks.Task TestObjectInBaseTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_General"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("TestObject in BaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BaseTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("TestObject is type BaseTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("TestObject in BaseSeleniumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject in BaseSeleniumTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Selenium")] + public async global::System.Threading.Tasks.Task TestObjectInBaseSeleniumTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Selenium"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "1"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("TestObject in BaseSeleniumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 11 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 12 + await testRunner.GivenAsync("class BaseSeleniumTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 13 + await testRunner.ThenAsync("BaseSeleniumTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 14 + await testRunner.AndAsync("TestObject is type SeleniumTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("TestObject in BaseWebServiceTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject in BaseWebServiceTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_WebService")] + public async global::System.Threading.Tasks.Task TestObjectInBaseWebServiceTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_WebService"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "2"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("TestObject in BaseWebServiceTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 17 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 18 + await testRunner.GivenAsync("class BaseWebServiceTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 19 + await testRunner.ThenAsync("BaseWebServiceTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 20 + await testRunner.AndAsync("TestObject is type WebServiceTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("TestObject in BaseEmailTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject in BaseEmailTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Email")] + public async global::System.Threading.Tasks.Task TestObjectInBaseEmailTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Email"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "3"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("TestObject in BaseEmailTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 23 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 24 + await testRunner.GivenAsync("class BaseEmailTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 25 + await testRunner.ThenAsync("BaseEmailTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 26 + await testRunner.AndAsync("TestObject is type EmailTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("TestObject in BaseDatabaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject in BaseDatabaseTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Database")] + public async global::System.Threading.Tasks.Task TestObjectInBaseDatabaseTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_Database"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "4"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("TestObject in BaseDatabaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 29 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 30 + await testRunner.GivenAsync("class BaseDatabaseTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 31 + await testRunner.ThenAsync("BaseDatabaseTestSteps TestObject is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 32 + await testRunner.AndAsync("TestObject is type DatabaseTestObject", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/WebServiceFeature.feature b/Framework/GherkinExtensionUnitTests/Features/WebServiceFeature.feature similarity index 100% rename from Framework/SpecFlowExtensionUnitTests/Features/WebServiceFeature.feature rename to Framework/GherkinExtensionUnitTests/Features/WebServiceFeature.feature diff --git a/Framework/GherkinExtensionUnitTests/Features/WebServiceFeature.feature.cs b/Framework/GherkinExtensionUnitTests/Features/WebServiceFeature.feature.cs new file mode 100644 index 000000000..36fc31942 --- /dev/null +++ b/Framework/GherkinExtensionUnitTests/Features/WebServiceFeature.feature.cs @@ -0,0 +1,161 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by Reqnroll (https://reqnroll.net/). +// Reqnroll Version:3.0.0.0 +// Reqnroll Generator Version:3.0.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +using Reqnroll; +namespace GherkinExtUnitTests.Features +{ + + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Reqnroll", "3.0.0.0")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class WebServiceFeatureFeature + { + + private global::Reqnroll.ITestRunner testRunner; + + private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; + + private static string[] featureTags = ((string[])(null)); + + private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "WebServiceFeature", "\tWeb Service Tests", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages()); + +#line 1 "WebServiceFeature.feature" +#line hidden + + public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext + { + get + { + return this._testContext; + } + set + { + this._testContext = value; + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static async global::System.Threading.Tasks.Task FeatureSetupAsync(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute(Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupBehavior.EndOfClass)] + public static async global::System.Threading.Tasks.Task FeatureTearDownAsync() + { + await global::Reqnroll.TestRunnerManager.ReleaseFeatureAsync(featureInfo); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public async global::System.Threading.Tasks.Task TestInitializeAsync() + { + testRunner = global::Reqnroll.TestRunnerManager.GetTestRunnerForAssembly(featureHint: featureInfo); + try + { + if (((testRunner.FeatureContext != null) + && (testRunner.FeatureContext.FeatureInfo.Equals(featureInfo) == false))) + { + await testRunner.OnFeatureEndAsync(); + } + } + finally + { + if (((testRunner.FeatureContext != null) + && testRunner.FeatureContext.BeforeFeatureHookFailed)) + { + throw new global::Reqnroll.ReqnrollException("Scenario skipped because of previous before feature hook error"); + } + if ((testRunner.FeatureContext == null)) + { + await testRunner.OnFeatureStartAsync(featureInfo); + } + } + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public async global::System.Threading.Tasks.Task TestTearDownAsync() + { + if ((testRunner == null)) + { + return; + } + try + { + await testRunner.OnScenarioEndAsync(); + } + finally + { + global::Reqnroll.TestRunnerManager.ReleaseTestRunner(testRunner); + testRunner = null; + } + } + + public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, global::Reqnroll.RuleInfo ruleInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo, ruleInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); + } + + public async global::System.Threading.Tasks.Task ScenarioStartAsync() + { + await testRunner.OnScenarioStartAsync(); + } + + public async global::System.Threading.Tasks.Task ScenarioCleanupAsync() + { + await testRunner.CollectScenarioErrorsAsync(); + } + + private static global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages InitializeCucumberMessages() + { + return new global::Reqnroll.Formatters.RuntimeSupport.FeatureLevelCucumberMessages("Features/WebServiceFeature.feature.ndjson", 3); + } + + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute("Driver in BaseWebServiceTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BaseWebServiceTestSteps")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "WebServiceFeature")] + [global::Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_WebService")] + public async global::System.Threading.Tasks.Task DriverInBaseWebServiceTestSteps() + { + string[] tagsOfScenario = new string[] { + "MAQS_WebService"}; + global::System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new global::System.Collections.Specialized.OrderedDictionary(); + string pickleIndex = "0"; + global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("Driver in BaseWebServiceTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags, pickleIndex); + string[] tagsOfRule = ((string[])(null)); + global::Reqnroll.RuleInfo ruleInfo = null; +#line 5 +this.ScenarioInitialize(scenarioInfo, ruleInfo); +#line hidden + if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) + { + await testRunner.SkipScenarioAsync(); + } + else + { + await this.ScenarioStartAsync(); +#line 6 + await testRunner.GivenAsync("class BaseWebServiceTestSteps", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given "); +#line hidden +#line 7 + await testRunner.ThenAsync("BaseWebServiceTestSteps WebServiceDriver is not null", ((string)(null)), ((global::Reqnroll.Table)(null)), "Then "); +#line hidden +#line 8 + await testRunner.AndAsync("BaseWebServiceTestSteps WebServiceDriver is type EventFiringWebServiceDriver", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + } +} +#pragma warning restore +#endregion diff --git a/Framework/GherkinExtensionUnitTests/GherkinExtensionUnitTests.csproj b/Framework/GherkinExtensionUnitTests/GherkinExtensionUnitTests.csproj new file mode 100644 index 000000000..91c01a021 --- /dev/null +++ b/Framework/GherkinExtensionUnitTests/GherkinExtensionUnitTests.csproj @@ -0,0 +1,43 @@ + + + + net8.0 + + false + + GherkinExtUnitTests + + GherkinExtUnitTests + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + + + + + + + + + + + + Always + + + + + + diff --git a/Framework/SpecFlowExtensionUnitTests/Steps/AppiumUnitTestSteps.cs b/Framework/GherkinExtensionUnitTests/Steps/AppiumUnitTestSteps.cs similarity index 97% rename from Framework/SpecFlowExtensionUnitTests/Steps/AppiumUnitTestSteps.cs rename to Framework/GherkinExtensionUnitTests/Steps/AppiumUnitTestSteps.cs index 096a89f6f..8f92ce31d 100644 --- a/Framework/SpecFlowExtensionUnitTests/Steps/AppiumUnitTestSteps.cs +++ b/Framework/GherkinExtensionUnitTests/Steps/AppiumUnitTestSteps.cs @@ -5,9 +5,9 @@ // TestSteps class that inherits from BaseAppiumTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BaseAppiumTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TechTalk.SpecFlow; +using Reqnroll; [assembly: DoNotParallelize] namespace SpecFlowExtUnitTests.Steps diff --git a/Framework/SpecFlowExtensionUnitTests/Steps/BaseUnitTestSteps.cs b/Framework/GherkinExtensionUnitTests/Steps/BaseUnitTestSteps.cs similarity index 97% rename from Framework/SpecFlowExtensionUnitTests/Steps/BaseUnitTestSteps.cs rename to Framework/GherkinExtensionUnitTests/Steps/BaseUnitTestSteps.cs index 02a014b42..3186571c7 100644 --- a/Framework/SpecFlowExtensionUnitTests/Steps/BaseUnitTestSteps.cs +++ b/Framework/GherkinExtensionUnitTests/Steps/BaseUnitTestSteps.cs @@ -5,9 +5,9 @@ // TestSteps class that inherits from BaseTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BaseTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TechTalk.SpecFlow; +using Reqnroll; namespace SpecFlowExtUnitTests.Steps { diff --git a/Framework/SpecFlowExtensionUnitTests/Steps/DatabaseUnitTestSteps.cs b/Framework/GherkinExtensionUnitTests/Steps/DatabaseUnitTestSteps.cs similarity index 98% rename from Framework/SpecFlowExtensionUnitTests/Steps/DatabaseUnitTestSteps.cs rename to Framework/GherkinExtensionUnitTests/Steps/DatabaseUnitTestSteps.cs index e612234f9..8666ac7c2 100644 --- a/Framework/SpecFlowExtensionUnitTests/Steps/DatabaseUnitTestSteps.cs +++ b/Framework/GherkinExtensionUnitTests/Steps/DatabaseUnitTestSteps.cs @@ -5,9 +5,9 @@ // TestSteps class that inherits from BaseEmailTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BaseDatabaseTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TechTalk.SpecFlow; +using Reqnroll; namespace SpecFlowExtUnitTests.Steps { diff --git a/Framework/SpecFlowExtensionUnitTests/Steps/EmailUnitTestSteps.cs b/Framework/GherkinExtensionUnitTests/Steps/EmailUnitTestSteps.cs similarity index 97% rename from Framework/SpecFlowExtensionUnitTests/Steps/EmailUnitTestSteps.cs rename to Framework/GherkinExtensionUnitTests/Steps/EmailUnitTestSteps.cs index 605de2ade..4f7c1aeab 100644 --- a/Framework/SpecFlowExtensionUnitTests/Steps/EmailUnitTestSteps.cs +++ b/Framework/GherkinExtensionUnitTests/Steps/EmailUnitTestSteps.cs @@ -5,9 +5,9 @@ // TestSteps class that inherits from BaseEmailTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BaseEmailTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TechTalk.SpecFlow; +using Reqnroll; namespace SpecFlowExtUnitTests.Steps { diff --git a/Framework/SpecFlowExtensionNUnitTests/Steps/PlaywrightUnitTestSteps.cs b/Framework/GherkinExtensionUnitTests/Steps/PlaywrightUnitTestSteps.cs similarity index 97% rename from Framework/SpecFlowExtensionNUnitTests/Steps/PlaywrightUnitTestSteps.cs rename to Framework/GherkinExtensionUnitTests/Steps/PlaywrightUnitTestSteps.cs index 266a5c5af..863e59bf1 100644 --- a/Framework/SpecFlowExtensionNUnitTests/Steps/PlaywrightUnitTestSteps.cs +++ b/Framework/GherkinExtensionUnitTests/Steps/PlaywrightUnitTestSteps.cs @@ -5,10 +5,10 @@ // TestSteps class that inherits from BasePlaywrightTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BasePlaywrightTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using NUnit.Framework; using System; -using TechTalk.SpecFlow; +using Reqnroll; namespace SpecFlowExtensionNUnitTests.Steps { diff --git a/Framework/SpecFlowExtensionUnitTests/Steps/SeleniumUnitTestSteps.cs b/Framework/GherkinExtensionUnitTests/Steps/SeleniumUnitTestSteps.cs similarity index 98% rename from Framework/SpecFlowExtensionUnitTests/Steps/SeleniumUnitTestSteps.cs rename to Framework/GherkinExtensionUnitTests/Steps/SeleniumUnitTestSteps.cs index 7f4255869..763048f13 100644 --- a/Framework/SpecFlowExtensionUnitTests/Steps/SeleniumUnitTestSteps.cs +++ b/Framework/GherkinExtensionUnitTests/Steps/SeleniumUnitTestSteps.cs @@ -5,10 +5,10 @@ // TestSteps class that inherits from BaseSeleniumTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BaseSeleniumTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using Microsoft.VisualStudio.TestTools.UnitTesting; using OpenQA.Selenium.Support.Events; -using TechTalk.SpecFlow; +using Reqnroll; namespace SpecFlowExtUnitTests.Steps { diff --git a/Framework/SpecFlowExtensionUnitTests/Steps/WebServiceUnitTestSteps.cs b/Framework/GherkinExtensionUnitTests/Steps/WebServiceUnitTestSteps.cs similarity index 98% rename from Framework/SpecFlowExtensionUnitTests/Steps/WebServiceUnitTestSteps.cs rename to Framework/GherkinExtensionUnitTests/Steps/WebServiceUnitTestSteps.cs index e4ddef7d0..827a9101b 100644 --- a/Framework/SpecFlowExtensionUnitTests/Steps/WebServiceUnitTestSteps.cs +++ b/Framework/GherkinExtensionUnitTests/Steps/WebServiceUnitTestSteps.cs @@ -5,9 +5,9 @@ // TestSteps class that inherits from BaseWebServiceTestSteps //-------------------------------------------------- using OpenMAQS.Maqs.BaseWebServiceTest; -using OpenMAQS.Maqs.SpecFlow.TestSteps; +using OpenMAQS.Maqs.Gherkin.TestSteps; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TechTalk.SpecFlow; +using Reqnroll; namespace SpecFlowExtUnitTests.Steps { diff --git a/Framework/MongoDBUnitTests/BaseFrameworkTests.cs b/Framework/MongoDBUnitTests/BaseFrameworkTests.cs index f43f0f11c..8129775e2 100644 --- a/Framework/MongoDBUnitTests/BaseFrameworkTests.cs +++ b/Framework/MongoDBUnitTests/BaseFrameworkTests.cs @@ -8,6 +8,7 @@ using OpenMAQS.Maqs.BaseTest; using OpenMAQS.Maqs.Utilities.Helper; using Microsoft.VisualStudio.TestTools.UnitTesting; +using MicroAssert=Microsoft.VisualStudio.TestTools.UnitTesting.Assert; using MongoDB.Bson; using NUnit.Framework; using System.Diagnostics.CodeAnalysis; @@ -37,10 +38,10 @@ public class BaseFrameworkTests : BaseTestUnitTests.BaseFrameworkTests /// [TestMethod] [TestCategory(TestCategories.Framework)] - [ExpectedException(typeof(AssertFailedException))] + //[MyExpectedException(typeof(AssertFailedException))] public new void SoftAssertWithFailure() { - base.SoftAssertWithFailure(); + MicroAssert.Throws(() => base.SoftAssertWithFailure()); } /// diff --git a/Framework/MongoDBUnitTests/MongoDBTests.cs b/Framework/MongoDBUnitTests/MongoDBTests.cs index db0a3885f..2543e870a 100644 --- a/Framework/MongoDBUnitTests/MongoDBTests.cs +++ b/Framework/MongoDBUnitTests/MongoDBTests.cs @@ -159,7 +159,7 @@ public void TestMongoFindListWithKey() [TestCategory(TestCategories.MongoDB)] public void TestMongoLinqQuery() { - IMongoQueryable query = + IQueryable query = from e in this.MongoDBDriver.Collection.AsQueryable() where e["lid"] == "test1" select e; diff --git a/Framework/MongoDBUnitTests/MongoDBUnitTests.csproj b/Framework/MongoDBUnitTests/MongoDBUnitTests.csproj index 33f04e621..47152fd14 100644 --- a/Framework/MongoDBUnitTests/MongoDBUnitTests.csproj +++ b/Framework/MongoDBUnitTests/MongoDBUnitTests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 false @@ -11,18 +11,18 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - - - - + + + + + + + + diff --git a/Framework/PlaywrightUnitTests/App.config b/Framework/PlaywrightUnitTests/App.config index 6ffd8197b..a8f1fa0d1 100644 --- a/Framework/PlaywrightUnitTests/App.config +++ b/Framework/PlaywrightUnitTests/App.config @@ -19,7 +19,7 @@ --> - + - + + @@ -53,14 +54,17 @@ - + - - - + + + + + + diff --git a/Framework/PlaywrightUnitTests/BasePlaywrightTestTests.cs b/Framework/PlaywrightUnitTests/BasePlaywrightTestTests.cs index 861204037..841accd2b 100644 --- a/Framework/PlaywrightUnitTests/BasePlaywrightTestTests.cs +++ b/Framework/PlaywrightUnitTests/BasePlaywrightTestTests.cs @@ -9,6 +9,7 @@ using OpenMAQS.Maqs.Utilities.Logging; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Diagnostics.CodeAnalysis; +using System; namespace PlaywrightTests { @@ -62,14 +63,15 @@ public void TestWorksIfLoggingIsOn() /// /// Make sure test passes with correct expected exception + /// Expected excepions at the test method level no longer exist. /// - [TestMethod] - [ExpectedException(typeof(AssertFailedException))] - public void TestFailsAsExpected() - { - this.PageDriver.Goto(PlaywrightConfig.WebBase()); - throw new AssertFailedException(); - } + //[TestMethod] + ////[MyExpectedException(typeof(AggregateException))] + //public void TestFailsAsExpected() + //{ + // Assert.Throws(() => this.PageDriver.Goto(PlaywrightConfig.WebBase())); + // //Assert.Throws(() => throw new AssertFailedException()); + //} /// /// Make sure test passes if there is something wrong with the logger diff --git a/Framework/PlaywrightUnitTests/ConfigTests.cs b/Framework/PlaywrightUnitTests/ConfigTests.cs index 16f88cdd6..5328bcef7 100644 --- a/Framework/PlaywrightUnitTests/ConfigTests.cs +++ b/Framework/PlaywrightUnitTests/ConfigTests.cs @@ -69,24 +69,24 @@ public void ConfigBrowserEnum(string browser, PlaywrightBrowser browserEnum) /// Make sure error correct error is thrown if we use a bad command timeout /// [TestMethod] - [ExpectedException(typeof(ArgumentException))] + //[MyExpectedException(typeof(ArgumentException))] public void ConfigBadCommandTimeout() { Config.AddTestSettingValue("CommandTimeout", "BAD", ConfigSection.PlaywrightMaqs); - var commandTimeout = PlaywrightConfig.CommandTimeout(); - Assert.Fail($"CommandTimeout returned type: {commandTimeout}"); + var commandTimeout = Assert.Throws(() => PlaywrightConfig.CommandTimeout()); + //Assert.Fail($"CommandTimeout returned type: {commandTimeout}"); } /// /// Make sure error correct error is thrown if we use a bad browser name /// [TestMethod] - [ExpectedException(typeof(ArgumentException))] + //[MyExpectedException(typeof(ArgumentException))] public void ConfigBadBrowserName() { Config.AddTestSettingValue("Browser", "IE", ConfigSection.PlaywrightMaqs); - var type = PlaywrightConfig.BrowserType(); - Assert.Fail($"IE returned type: {type}"); + var type = Assert.Throws(() => PlaywrightConfig.BrowserType()); + //Assert.Fail($"IE returned type: {type}"); } /// diff --git a/Framework/PlaywrightUnitTests/PlaywrightSyncElementTests.cs b/Framework/PlaywrightUnitTests/PlaywrightSyncElementTests.cs index 428124ea6..ecb765ab1 100644 --- a/Framework/PlaywrightUnitTests/PlaywrightSyncElementTests.cs +++ b/Framework/PlaywrightUnitTests/PlaywrightSyncElementTests.cs @@ -11,6 +11,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System; namespace PlaywrightTests { @@ -33,6 +34,7 @@ public void CreatePlaywrightPageModel() var pageModel = new PageModel(this.TestObject); pageModel.OpenPage(); Models.TryAdd(this.TestObject, pageModel); + } /// diff --git a/Framework/PlaywrightUnitTests/PlaywrightUnitTest.cs b/Framework/PlaywrightUnitTests/PlaywrightUnitTest.cs new file mode 100644 index 000000000..52b04eb29 --- /dev/null +++ b/Framework/PlaywrightUnitTests/PlaywrightUnitTest.cs @@ -0,0 +1,530 @@ +//----------------------------------------------------- +// +// Copyright 2023 OpenMAQS, All rights Reserved +// +// Test the playwright framework +//----------------------------------------------------- +using OpenMAQS.Maqs.BasePlaywrightTest; +using OpenMAQS.Maqs.Utilities.Helper; +using OpenMAQS.Maqs.Utilities.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Playwright; +using Microsoft.Playwright.MSTest; +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PlaywrightUnitTests +{ + /// + /// Test the playwright framework + /// + [TestClass] + [ExcludeFromCodeCoverage] + public class PlaywrightUnitTests : BasePlaywrightTest + { + /// + /// Unit testing site URL - Login page + /// + private static readonly string TestSiteUrl = PlaywrightConfig.WebBase(); + + /// + /// Unit testing site URL - Async page + /// + private static readonly string TestSiteAsyncUrl = TestSiteUrl + "async.html"; + + /// + /// Unit testing site URL - Automation page + /// + private static readonly string TestSiteAutomationUrl = TestSiteUrl + "index.html"; + + /// + /// Home button css selector + /// + private PlaywrightSyncElement HomeButtonCssSelector + { + get {return new PlaywrightSyncElement(this.PageDriver, "#homeButton > a"); } + } + /// + /// Home button css selector + /// + private PlaywrightSyncElement DropdownToggleClassSelector + { + get + { + return new PlaywrightSyncElement(this.PageDriver, "dropdown-toggle"); + } + } + + /// + /// Dropdown selector + /// + private PlaywrightSyncElement AsyncDropdownCssSelector + { + get + { + return new PlaywrightSyncElement(this.PageDriver, "#Selector"); + } + } + + /// + /// Dropdown label + /// + private PlaywrightSyncElement AsyncOptionsLabel + { + get + { + return new PlaywrightSyncElement(this.PageDriver, "#Label"); + } + } + + /// + /// Dropdown label - hidden once dropdown loads + /// + private PlaywrightSyncElement AsyncLoadingLabel + { + get + { + return new PlaywrightSyncElement(this.PageDriver, "#LoadingLabel"); + } + } + + /// + /// Asynchronous div that loads after a delay on Async Testing Page + /// + private PlaywrightSyncElement AsyncLoadingTextDiv + { + get + { + return new PlaywrightSyncElement(this.PageDriver, "#loading-div-text"); + } + } + + /// + /// Names label + /// + private PlaywrightSyncElement AutomationNamesLabel + { + get + { + return new PlaywrightSyncElement(this.PageDriver, "#Dropdown > p > strong > label"); + } + } + + /// + /// Selector that is not in page + /// + private PlaywrightSyncElement NotInPage + { + get + { + return new PlaywrightSyncElement(this.PageDriver, "NOTINPAGE"); + } + } + + /// + /// First dialog button + /// + private PlaywrightSyncElement AutomationShowDialog1 + { + get + { + return new PlaywrightSyncElement(this.PageDriver, "#showDialog1"); + } + } + + /// + /// Food table + /// + private PlaywrightSyncElement FoodTable + { + get + { + return new PlaywrightSyncElement(this.PageDriver, "#FoodTable"); + } + } + + /// + /// Flower table + /// + private PlaywrightSyncElement FlowerTable + { + get + { + return new PlaywrightSyncElement(this.PageDriver, "#FlowerTable TD"); + } + } + + /// + /// Make sure we can open a browser + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void OpenBrowser() + { + PageDriver.Goto(TestSiteUrl); + } + + /// + /// Method to check for soft asserts + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightSoftAssertTest() + { + this.PageDriver.Goto(TestSiteAutomationUrl); + string title = PageDriver.Title(); + SoftAssert.Assert(() => Assert.AreEqual("Automation - MAQS Test Site", PageDriver.Title()), "Title Test", "Title is incorrect"); + SoftAssert.FailTestIfAssertFailed(); + } + + /// + /// Method to check for soft asserts + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightSoftAssertIsFalseTest() + { + this.PageDriver.Goto(TestSiteAutomationUrl); + SoftAssert.Assert(() => Assert.IsFalse("Automation".Equals(PageDriver.Title())), "Title Test", "Title is incorrect"); + SoftAssert.FailTestIfAssertFailed(); + } + + /// + /// Method to check for soft asserts + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightSoftAssertIsTrueTest() + { + this.PageDriver.Goto(TestSiteAutomationUrl); + SoftAssert.Assert(() => Assert.IsTrue(PageDriver.Title().Contains("Automation")), "Title Test", "Title is incorrect"); + SoftAssert.FailTestIfAssertFailed(); + } + + /// + /// Method to check for soft asserts + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightSoftAssertEmptyMessageTest() + { + this.PageDriver.Goto(TestSiteAutomationUrl); + SoftAssert.Assert(() => Assert.IsTrue(PageDriver.Title().Contains("Automation")), "", "Title is incorrect"); + SoftAssert.FailTestIfAssertFailed(); + } + + /// + /// Method to check for soft asserts + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + //[MyExpectedException(typeof(AggregateException))] + public void PlaywrightSoftAssertIsTrueFalseBoolean() + { + this.PageDriver.Goto(TestSiteAutomationUrl); + var result = SoftAssert.Assert(() => Assert.IsTrue(!PageDriver.Title().Contains("Automation")), "", "Title is incorrect"); + Assert.IsFalse(result); + Assert.Throws(() => this.SoftAssert.FailTestIfAssertFailed()); + } + + /// + /// Verify that a screenshot is taken if the PlaywrightSoftAssert.IsTrue gets a false condition and the logger is set to log screenshots + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightSoftAssertIsTrueFalseCondition() + { + this.PageDriver.Goto(TestSiteAutomationUrl); + this.Log = new FileLogger(string.Empty, "PlaywrightSoftAssertIsTrueFalseCondition.txt", MessageType.GENERIC, true); + PlaywrightSoftAssert playwrightSoftAssert = new PlaywrightSoftAssert(TestObject); + string logLocation = ((IFileLogger)Log).FilePath; + string screenShotLocation = logLocation.Substring(0, logLocation.LastIndexOf('.')) + " testSoftAssert" + " (1).Png"; + + bool isFalse = playwrightSoftAssert.Assert(() => Assert.IsTrue(false), "testSoftAssert", "message"); + + Assert.IsTrue(File.Exists(screenShotLocation), $"Fail to find screenshot: {screenShotLocation}"); + File.Delete(screenShotLocation); + File.Delete(logLocation); + + Assert.IsFalse(isFalse); + } + + /// + /// Verify that a screenshot is taken if the PlaywrightSoftAssert.IsTrue gets a false condition and the logger is set to log screenshots + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightSoftAssertWithAssertIsTrueFalseCondition() + { + this.PageDriver.Goto(TestSiteAutomationUrl); + this.Log = new FileLogger(string.Empty, "PlaywrightSoftAssertWithAssertIsTrueFalseCondition.txt", MessageType.GENERIC, true); + PlaywrightSoftAssert playwrightSoftAssert = new PlaywrightSoftAssert(TestObject); + string logLocation = ((IFileLogger)Log).FilePath; + string screenShotLocation = logLocation.Substring(0, logLocation.LastIndexOf('.')) + " 1 (1).Png"; + + bool isFalse = playwrightSoftAssert.Assert(() => Assert.Fail("testSoftAssert"), "1", "Test assert fail message"); + + Assert.IsTrue(File.Exists(screenShotLocation), $"Fail to find screenshot: {screenShotLocation}"); + File.Delete(screenShotLocation); + File.Delete(logLocation); + + Assert.IsFalse(isFalse); + } + + /// + /// Verify that page source is saved if the PlaywrightSoftAssert.IsTrue gets a false condition and the logger is set to save Page Source + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PwSAIsFailWithPageSource() + { + this.PageDriver.Goto(TestSiteAutomationUrl); + //this.Log = new FileLogger(string.Empty, "SAConditionPageSource.txt", MessageType.GENERIC, true); + PlaywrightSoftAssert playwrightSoftAssert = new PlaywrightSoftAssert(TestObject); + string logLocation = ((IFileLogger)this.Log).FilePath; + Log.LogMessage($"filepath is: {logLocation}"); + string pageSourceLocation = logLocation.Substring(0, logLocation.LastIndexOf('.')) + "_PS (1).txt"; + Log.LogMessage($"pagesource file name is: {pageSourceLocation}"); + + bool isFalse = playwrightSoftAssert.Assert(() => Assert.IsTrue(false, "testSoftAssert", "message"), "SAPageSource", "Fail on purpose"); + + Assert.IsTrue(File.Exists(pageSourceLocation), $"Fail to find page source file: {pageSourceLocation}"); + File.Delete(pageSourceLocation); + //File.Delete(logLocation); + + Assert.IsFalse(isFalse); + } + + /// + /// Verify that page source is saved if the PlaywrightSoftAssert.IsTrue gets a false condition and the logger is set to save Page Source + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightSoftAssertWithAssertIsTrueFalseConditionPageSource() + { + this.PageDriver.Goto(TestSiteAutomationUrl); + this.Log = new FileLogger(string.Empty, "PlaywrightSoftAssertIsTrueFalseConditionPageSource.txt", MessageType.GENERIC, true); + PlaywrightSoftAssert playwrightSoftAssert = new PlaywrightSoftAssert(TestObject); + string logLocation = ((IFileLogger)Log).FilePath; + string pageSourceLocation = logLocation.Substring(0, logLocation.LastIndexOf('.')) + "_PS (1).txt"; + + bool isFalse = playwrightSoftAssert.Assert(() => Assert.IsTrue(false), "1", "message"); + + Assert.IsTrue(File.Exists(pageSourceLocation), "Fail to find page source"); + File.Delete(pageSourceLocation); + File.Delete(logLocation); + + Assert.IsFalse(isFalse); + } + + /// + /// Verify that a screenshot is taken if the playwrightSoftAssert.IsFalse gets a true condition and the logger is set to log screenshots + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void playwrightSoftAssertIsFalseTrueCondition() + { + // Make sure we initialized the web driver + Assert.IsNotNull(this.PageDriver); + + PlaywrightSoftAssert playwrightSoftAssert = new PlaywrightSoftAssert(TestObject); + string logLocation = ((IFileLogger)Log).FilePath; + string screenShotLocation = logLocation.Substring(0, logLocation.LastIndexOf('.')) + " testSoftAssert" + " (1).Png"; + + bool isFalse = playwrightSoftAssert.Assert(() => Assert.IsFalse(true), "testSoftAssert", "message"); + + Assert.IsTrue(File.Exists(screenShotLocation), $"Fail to find screenshot: {screenShotLocation}"); + File.Delete(screenShotLocation); + + Assert.IsFalse(isFalse); + } + + /// + /// Verify that a screenshot is not taken if no browser is initialized and the PlaywrightSoftAssert.IsFalse gets a true condition and the logger is set to log screenshots + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightSoftAssertIsFalseTrueConditionNoBrowser() + { + PlaywrightSoftAssert playwrightSoftAssert = new PlaywrightSoftAssert(TestObject); + string logLocation = ((IFileLogger)Log).FilePath; + string screenShotLocation = logLocation.Substring(0, logLocation.LastIndexOf('.')) + " testSoftAssert" + " (1).Jpeg"; + + bool isFalse = playwrightSoftAssert.Assert(() => Assert.IsFalse(true), "testSoftAssert", "message"); + + Assert.IsFalse(File.Exists(screenShotLocation), "Should not have taken screenshot"); + Assert.IsFalse(isFalse); + } + + /// + /// Verify that page source is saved if the PlaywrightSoftAssert.IsFalse gets a true condition and the logger is set to save Page Source + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightSoftAssertIsFalseTrueConditionPageSource() + { + // Make sure we initialized the web driver + Assert.IsNotNull(this.PageDriver); + + PlaywrightSoftAssert playwrightSoftAssert = new PlaywrightSoftAssert(TestObject); + string logLocation = ((IFileLogger)Log).FilePath; + string pageSourceLocation = logLocation.Substring(0, logLocation.LastIndexOf('.')) + "_PS (1).txt"; + Log.LogMessage($"pagesourcelocation: {pageSourceLocation}"); + bool isFalse = playwrightSoftAssert.Assert(() => Assert.IsFalse(true), "testSoftAssert", "message"); + + Assert.IsTrue(File.Exists(pageSourceLocation), "Fail to find page source"); + //File.Delete(pageSourceLocation); + + Assert.IsFalse(isFalse); + } + + /// + /// Verify that page source is not saved if no browser is initialized and the playwrightSoftAssert.IsFalse gets a true condition and the logger is set to save Page Source + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightSoftAssertIsFalseTrueConditionPageSourceNoBrowser() + { + PlaywrightSoftAssert playwrightSoftAssert = new PlaywrightSoftAssert(TestObject); + string logLocation = ((IFileLogger)Log).FilePath; + string pageSourceLocation = logLocation.Substring(0, logLocation.LastIndexOf('.')) + "_PS (1).txt"; + + bool isFalse = playwrightSoftAssert.Assert(() => Assert.IsFalse(true), "testSoftAssert", "message"); + + Assert.IsTrue(!File.Exists(pageSourceLocation), "Should not have captured page source"); + Assert.IsFalse(isFalse); + } + + /// + /// Verify that PlaywrightSoftAssert.AreEqual works as expected + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightSoftAssertAreEqual() + { + PlaywrightSoftAssert playwrightSoftAssert = new PlaywrightSoftAssert(TestObject); + bool isTrue = playwrightSoftAssert.Assert(() => Assert.AreEqual("test string", "test string"), "test message"); + Assert.IsTrue(isTrue); + } + + /// + /// Test to check if the soft assert fails. + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + //[MyExpectedException(typeof(AggregateException))] + public void PlaywrightSoftAssertExpectFail() + { + this.PageDriver.Goto(TestSiteAutomationUrl); + SoftAssert.Assert(() => Assert.AreEqual("Wrong Title", PageDriver.Title()), "Title Test", "Title is incorrect"); + Assert.Throws(() => SoftAssert.FailTestIfAssertFailed()); + } + + + + /// + /// Make sure the test objects map properly + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + [TestCategory(TestCategories.Utilities)] + public void PlaywrightTestObjectMapCorrectly() + { + Assert.AreEqual(this.TestObject.Log, this.Log, "Logs don't match"); + Assert.AreEqual(this.TestObject.SoftAssert, this.SoftAssert, "Soft asserts don't match"); + Assert.AreEqual(this.TestObject.PerfTimerCollection, this.PerfTimerCollection, "Soft asserts don't match"); + Assert.AreEqual(this.TestObject.PageDriver, this.PageDriver, "Web drivers don't match"); + } + + /// + /// Make sure test object values are saved as expected + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + [TestCategory(TestCategories.Utilities)] + public void PlaywrightTestObjectValuesCanBeUsed() + { + TestObject.SetValue("1", "one"); + + Assert.AreEqual("one", TestObject.Values["1"]); + Assert.IsFalse(TestObject.Values.TryGetValue("2", out string outValue), "Didn't expect to get value for key '2', but got " + outValue); + } + + /// + /// Make sure the test object objects are saved as expected + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + [TestCategory(TestCategories.Utilities)] + public void PlaywrightTestObjectObjectssCanBeUsed() + { + StringBuilder builder = new StringBuilder(); + TestObject.SetObject("1", builder); + + Assert.AreEqual(TestObject.Objects["1"], builder); + + Assert.IsFalse(TestObject.Objects.TryGetValue("2", out object outObject), "Didn't expect to get value for key '2'"); + Assert.IsNull(outObject, "Object should be null"); + + builder.Append("123"); + + Assert.AreEqual(((StringBuilder)TestObject.Objects["1"]).ToString(), builder.ToString()); + } + + + /// + /// Verify that CreateNewTestObject creates the correct Test Object + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightCreateNewTestObject() + { + this.SetupTestObject(); + IPlaywrightTestObject newTestObject = TestObject; + + var expectedWebDriver = PageDriver.ToString(); + var actualWebDriver = newTestObject.PageDriver.ToString(); + var expectedLog = Log.ToString(); + var actualLog = newTestObject.Log.ToString(); + var expectedSoftAssert = SoftAssert.ToString(); + var actualSoftAssert = newTestObject.SoftAssert.ToString(); + var expectedPerf = PerfTimerCollection.ToString(); + var actualPerf = newTestObject.PerfTimerCollection.ToString(); + + // Need to quit webdriver here in order for remote browser to close browser correctly. + newTestObject.PageDriver.Dispose(); + Assert.AreEqual(expectedWebDriver, actualWebDriver); + Assert.AreEqual(expectedLog, actualLog); + Assert.AreEqual(expectedSoftAssert, actualSoftAssert); + Assert.AreEqual(expectedPerf, actualPerf); + } + + /// + /// Helper function to remove created custom file logs and return contained string + /// + /// string contained in custom log + protected string GetAndRemoveCustomFileLog() + { + IFileLogger outputLog = (IFileLogger)Log; + string log = File.ReadAllText(outputLog.FilePath); + try + { + File.Delete(outputLog.FilePath); + string screenShotLocation = outputLog.FilePath.Substring(0, outputLog.FilePath.LastIndexOf('.')) + ".Png"; + File.Delete(screenShotLocation); + } + catch (FileNotFoundException e) + { + Console.WriteLine("File not found exception " + e); + } + + this.Log = new FileLogger(); + return log; + } + } +} \ No newline at end of file diff --git a/Framework/PlaywrightUnitTests/PlaywrightUnitTests.csproj b/Framework/PlaywrightUnitTests/PlaywrightUnitTests.csproj index a2f488863..7d677238d 100644 --- a/Framework/PlaywrightUnitTests/PlaywrightUnitTests.csproj +++ b/Framework/PlaywrightUnitTests/PlaywrightUnitTests.csproj @@ -1,20 +1,21 @@ - + - net6.0 + net8.0 false - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - + + + + + diff --git a/Framework/PlaywrightUnitTests/PlaywrightUtilsTest.cs b/Framework/PlaywrightUnitTests/PlaywrightUtilsTest.cs new file mode 100644 index 000000000..c4bd91b52 --- /dev/null +++ b/Framework/PlaywrightUnitTests/PlaywrightUtilsTest.cs @@ -0,0 +1,778 @@ +//----------------------------------------------------- +// +// Copyright 2025 OpenMAQS, All rights Reserved +// +// Test the playwright framework +//----------------------------------------------------- +using OpenMAQS.Maqs.BasePlaywrightTest; +using OpenMAQS.Maqs.Utilities.Helper; +using OpenMAQS.Maqs.Utilities.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Newtonsoft.Json.Linq; +using System; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; +using System.Text.RegularExpressions; +using Microsoft.Playwright; + +namespace PlaywrightUtilsTest +{ + /// + /// Utility tests + /// + [TestClass] + [ExcludeFromCodeCoverage] + public class PlaywrightUtilsTest : BasePlaywrightTest + { + /// + /// Axe JSON with an error + /// + private const string AxeResultWithError = "{\"error\":\"AutomationError\", \"testEngine\": { \"name\":\"axe-core\",\"version\":\"3.4.1\"}, \"testRunner\": { \"name\":\"axe\"}, \"testEnvironment\": { \"userAgent\":\"AutoAgent\",\"windowWidth\": 1200, \"windowHeight\": 646, \"orientationAngle\": 0, \"orientationType\":\"landscape-primary\"},\"timestamp\":\"2020-04-14T01:33:59.139Z\",\"url\":\"url\",\"toolOptions\":{\"reporter\":\"v1\"},\"violations\":[],\"passes\":[],\"incomplete\":[],\"inapplicable\": []}"; + + /// + /// Unit testing site URL - Login page + /// + private static readonly string TestSiteUrl = PlaywrightConfig.WebBase(); + + /// + /// Unit testing accessibility site URL - Login page + /// + private static readonly string TestSiteAccessibilityUrl = TestSiteUrl + "../Training1/LoginPage.html"; + + /// + /// Unit testing site URL - Automation page + /// + private static readonly string TestSiteAutomationUrl = TestSiteUrl + "index.html"; + + /// + /// First dialog button + /// + private PlaywrightSyncElement AutomationShowDialog1 + { + get { return new PlaywrightSyncElement(this.PageDriver, "#showDialog1"); } + } + + /// + /// Verify CaptureScreenshot works - Validating that the screenshot was created + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void TryScreenshot() + { + PageDriver.Goto(TestSiteUrl); + //WebDriver.Wait().ForPageLoad(); + PlaywrightUtilities.CaptureScreenshot(this.PageDriver, this.TestObject); + string filePath = Path.ChangeExtension(((IFileLogger)TestObject.Log).FilePath, ".Png"); + Assert.IsTrue(File.Exists(filePath), "Fail to find screenshot"); + File.Delete(filePath); + } + + /// + /// Verify CaptureScreenshot works with console logger - Validating that the screenshot was created + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void TryScreenshotWithConsoleLogger() + { + PageDriver.Goto(TestSiteUrl); + //WebDriver.Wait().ForPageLoad(); + + // Create a console logger and calculate the file location + ConsoleLogger consoleLogger = new ConsoleLogger(); + TestObject.Log = consoleLogger; + string expectedPath = Path.Combine(LoggingConfig.GetLogDirectory(), "ScreenCapDelete.Png"); + + // Take a screenshot + PlaywrightUtilities.CaptureScreenshot(this.PageDriver, this.TestObject, "Delete"); + + // Make sure we got the screenshot and than cleanup + Assert.IsTrue(File.Exists(expectedPath), $"Fail to find screenshot at {expectedPath}"); + File.Delete(expectedPath); + } + + /// + /// Verify CaptureScreenshot works with HTML File logger - Validating that the screenshot was created + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void TryScreenshotWithHTMLFileLogger() + { + PageDriver.Goto(TestSiteUrl); + //WebDriver.Wait().ForPageLoad(); + + // Create a console logger and calculate the file location + HtmlFileLogger htmlFileLogger = new HtmlFileLogger(LoggingConfig.GetLogDirectory()); + TestObject.Log = htmlFileLogger; + + // Take a screenshot + PlaywrightUtilities.CaptureScreenshot(this.PageDriver, this.TestObject, "Delete"); + + Stream fileStream = null; + string logContents = string.Empty; + + // This will open the Log file and read in the text + try + { + fileStream = new FileStream(htmlFileLogger.FilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); + + using StreamReader textReader = new StreamReader(fileStream); + fileStream = null; + logContents = textReader.ReadToEnd(); + } + finally + { + if (fileStream != null) + { + fileStream.Dispose(); + } + } + + // Find the base64 encoded string + Regex pattern = new Regex("src='data:image/png;base64, (?[^']+)'"); + var matches = pattern.Match(logContents); + + // Try to convert the Base 64 string to find if it is a valid string + try + { + Convert.FromBase64String(matches.Groups["image"].Value); + } + catch (FormatException) + { + Assert.Fail("image saves was not a Base64 string"); + } + finally + { + File.Delete(htmlFileLogger.FilePath); + } + } + + /// + /// Verify that CaptureScreenshot properly handles exceptions and returns false + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void CaptureScreenshotThrownException() + { + FileLogger tempLogger = new FileLogger + { + FilePath = "<>\0" // illegal file path + }; + + TestObject.Log = tempLogger; + PageDriver.Goto(TestSiteUrl); + //WebDriver.Wait().ForPageLoad(); + bool successfullyCaptured = PlaywrightUtilities.CaptureScreenshot(PageDriver, TestObject); + Assert.IsFalse(successfullyCaptured); + } + + /// + /// Verify that CaptureScreenshot creates Directory if it does not exist already + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void CaptureScreenshotNoExistingDirectory() + { + PageDriver.Goto(TestSiteUrl); + //WebDriver.Wait().ForPageLoad(); + string screenShotPath = PlaywrightUtilities.CaptureScreenshot(PageDriver, TestObject, "TempTestDirectory", "CapScreenShotNoDir", PlaywrightUtilities.GetScreenShotFormat()); + Assert.IsTrue(File.Exists(screenShotPath), "Fail to find screenshot"); + File.Delete(screenShotPath); + } + + /// + /// Verify that the captured screenshot is associated to the test object + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void CapturedScreenshotTestObjectAssociation() + { + PageDriver.Goto(TestSiteUrl); + //WebDriver.Wait().ForPageLoad(); + string pagePicPath = PlaywrightUtilities.CaptureScreenshot(PageDriver, TestObject, "TempTestDirectory", "TestObjAssocTest"); + + Assert.IsTrue(TestObject.ContainsAssociatedFile(pagePicPath), "The captured screenshot wasn't added to the associated files"); + + File.Delete(pagePicPath); + } + + /// + /// Verify that page source file is being created + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightPageSourceFileIsCreated() + { + PageDriver.Goto(TestSiteUrl); + //WebDriver.Wait().ForPageLoad(); + string pageSourcePath = PlaywrightUtilities.SavePageSource(PageDriver, TestObject, "TempTestDirectory", "SeleniumPSFile"); + Assert.IsTrue(File.Exists(pageSourcePath), "Failed to find Page Source"); + File.Delete(pageSourcePath); + } + + /// + /// Verify SavePageSource works with console logger - Validating that page source was created + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void PlaywrightPageSourceWithConsoleLogger() + { + PageDriver.Goto(TestSiteUrl); + //WebDriver.Wait().ForPageLoad(); + + // Create a console logger and calculate the file location + ConsoleLogger consoleLogger = new ConsoleLogger(); + string expectedPath = Path.Combine(LoggingConfig.GetLogDirectory(), "PageSourceConsole.txt"); + TestObject.Log = consoleLogger; + + // Take a screenshot + PlaywrightUtilities.SavePageSource(this.PageDriver, this.TestObject, "Console"); + + // Make sure we got the screenshot and than cleanup + Assert.IsTrue(File.Exists(expectedPath), "Fail to find screenshot"); + File.Delete(expectedPath); + } + + /// + /// Verify that SavePageSource properly handles exceptions and returns false + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void SavePageSourceThrownException() + { + FileLogger tempLogger = new FileLogger + { + FilePath = "<>\0" // illegal file path + }; + + TestObject.Log = tempLogger; + PageDriver.Goto(TestSiteUrl); + //WebDriver.Wait().ForPageLoad(); + bool successfullySaved = PlaywrightUtilities.SavePageSource(PageDriver, TestObject); + Assert.IsFalse(successfullySaved); + } + + /// + /// Verify that the captured screenshot is associated to the test object + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void SavedPageSourceTestObjectAssociation() + { + PageDriver.Goto(TestSiteUrl); + //WebDriver.Wait().ForPageLoad(); + string pageSourcePath = PlaywrightUtilities.SavePageSource(PageDriver, TestObject, "TempTestDirectory", "TestObjAssocTest"); + + Assert.IsTrue(TestObject.ContainsAssociatedFile(pageSourcePath), "The saved page source wasn't added to the associated files"); + + File.Delete(pageSourcePath); + } + + ///// + ///// Test Lazy WebElementToDriver with an unwrappedDriver + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void LazyWebElementToWebDriverUnwrappedDriver() + //{ + // PageDriver.Goto(TestSiteAutomationUrl); + // IWebDriver driver = this.WebDriver.GetLowLevelDriver(); + // LazyElement lazy = new LazyElement(this.TestObject, driver, AutomationShowDialog1); + + // IWebDriver basedriver = PlaywrightUtilities.WebElementToWebDriver(lazy); + // Assert.AreEqual("OpenQA.Playwright.Chrome.ChromeDriver", basedriver.GetType().ToString()); + //} + + ///// + ///// Test WebElementToDriver with an unwrappedDriver + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void WebElementToWebDriverUnwrappedDriver() + //{ + // PageDriver.Goto(TestSiteAutomationUrl); + // IWebDriver driver = ((IWrapsDriver)WebDriver).WrappedDriver; + // IWebElement element = driver.FindElement(AutomationShowDialog1); + + // IWebDriver basedriver = PlaywrightUtilities.WebElementToWebDriver(element); + // Assert.AreEqual("OpenQA.Playwright.Chrome.ChromeDriver", basedriver.GetType().ToString()); + //} + + /// + /// Verify that CaptureScreenshot captured is in the Joint Photographic Experts Group format + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void CaptureScreenshotJpegFormat() + { + PageDriver.Goto(TestSiteUrl); + //WebDriver.Wait().ForPageLoad(); + string screenShotPath = PlaywrightUtilities.CaptureScreenshot(PageDriver, TestObject, "TempTestDirectory", "TempTestFilePath", imageFormat: ScreenshotType.Jpeg); + Assert.IsTrue(File.Exists(screenShotPath), "Fail to find screenshot"); + Assert.AreEqual(".Jpeg", Path.GetExtension(screenShotPath), "The screenshot format was not in '.Jpeg' format"); + File.Delete(screenShotPath); + } + + /// + /// Verify that CaptureScreenshot captured is in the Portable Network Graphics format + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void CaptureScreenshotPngFormat() + { + PageDriver.Goto(TestSiteUrl); + //WebDriver.Wait().ForPageLoad(); + string screenShotPath = PlaywrightUtilities.CaptureScreenshot(PageDriver, TestObject, "TempTestDirectory", "TempTestFilePath", imageFormat: ScreenshotType.Png); + Assert.IsTrue(File.Exists(screenShotPath), "Fail to find screenshot"); + Assert.AreEqual(".Png", Path.GetExtension(screenShotPath), "The screenshot format was not in '.Png' format"); + File.Delete(screenShotPath); + } + + /// + /// Verify CaptureScreenshot works - With Modified ImageFormat Config + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void TryScreenshotImageFormat() + { + PageDriver.Goto(TestSiteUrl); + //WebDriver.Wait().ForPageLoad(); + PlaywrightUtilities.CaptureScreenshot(this.PageDriver, this.TestObject); + string filePath = Path.ChangeExtension(((IFileLogger)this.Log).FilePath, PlaywrightUtilities.GetScreenShotFormat().ToString()); + Assert.IsTrue(File.Exists(filePath), "Fail to find screenshot"); + Assert.AreEqual(Path.GetExtension(filePath), "." + PlaywrightUtilities.GetScreenShotFormat().ToString(), "The screenshot format was not in correct Format"); + File.Delete(filePath); + } + + /// + /// Verify the GetScreenShotFormat function gets the correct value from the config + /// + [TestMethod] + [TestCategory(TestCategories.Playwright)] + public void GetImageFormatFromConfig() + { + Assert.AreEqual(ScreenshotType.Png, PlaywrightUtilities.GetScreenShotFormat(), "The Incorrect Image Format was returned, expected: " + Config.GetGeneralValue("ImageFormat")); + } + + ///// + ///// Verify we get verbose message back + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void AccessibilityCheckVerbose() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // //WebDriver.Wait().ForPageLoad(); + + // string filePath = ((IFileLogger)Log).FilePath; + + // PlaywrightUtilities.CheckAccessibility(this.TestObject); + // string logContent = File.ReadAllText(filePath); + + // SoftAssert.Assert(() => Assert.IsTrue(logContent.Contains("Found 13 items"), "Expected to find 13 pass matches.")); + // SoftAssert.Assert(() => Assert.IsTrue(logContent.Contains("Found 70 items"), "Expected to find 70 inapplicable matches.")); + // SoftAssert.Assert(() => Assert.IsTrue(logContent.Contains("Found 6 items"), "Expected to find 6 violations matches.")); + // SoftAssert.Assert(() => Assert.IsTrue(logContent.Contains("Found 0 items"), "Expected to find 0 incomplete matches.")); + // SoftAssert.FailTestIfAssertFailed(); + //} + + ///// + ///// Verify message levels are respected + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void AccessibilityCheckRespectsMessageLevel() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // WebDriver.Wait().ForPageLoad(); + + // string filePath = Path.GetDirectoryName(((IFileLogger)Log).FilePath); + // FileLogger fileLogger = new FileLogger(filePath, "LevTest.txt", MessageType.WARNING); + + // try + // { + // PlaywrightUtilities.CheckAccessibility(TestObject.WebDriver, fileLogger); + + // string logContent = File.ReadAllText(fileLogger.FilePath); + + // Assert.IsTrue(!logContent.Contains("Passes check for"), "Did not expect expected to check for pass matches."); + // Assert.IsTrue(!logContent.Contains("Inapplicable check for"), "Did not expect expected to check for inapplicable matches."); + // Assert.IsTrue(!logContent.Contains("Incomplete check for"), "Did not expected to find any incomplete matches."); + // Assert.IsTrue(logContent.Contains("Found 6 items"), "Expected to find 6 violations matches."); + // } + // finally + // { + // File.Delete(fileLogger.FilePath); + // } + //} + + ///// + ///// Verify inapplicable only check respected + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void AccessibilityInapplicableCheckRespectsMessageLevel() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // WebDriver.Wait().ForPageLoad(); + + // string filePath = Path.GetDirectoryName(((IFileLogger)Log).FilePath); + // FileLogger fileLogger = new FileLogger(filePath, this.TestContext.TestName + ".txt", MessageType.INFORMATION); + + // try + // { + // PlaywrightUtilities.CheckAccessibilityInapplicable(TestObject.WebDriver, fileLogger, MessageType.WARNING, false); + // string logContent = File.ReadAllText(fileLogger.FilePath); + // SoftAssert.Assert(() => Assert.IsTrue(!logContent.Contains("Violations check"), "Did not expect violation check")); + // SoftAssert.Assert(() => Assert.IsTrue(!logContent.Contains("Passes check"), "Did not expect pass check")); + // SoftAssert.Assert(() => Assert.IsTrue(!logContent.Contains("Incomplete check"), "Did not expect incomplete check")); + // SoftAssert.Assert(() => Assert.IsTrue(logContent.Contains("Inapplicable check"), "Did expect inapplicable check")); + // } + // finally + // { + // File.Delete(fileLogger.FilePath); + // } + //} + + ///// + ///// Verify incomplete only check respected + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void AccessibilityIncompleteCheckRespectsMessageLevel() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // WebDriver.Wait().ForPageLoad(); + + // string filePath = Path.GetDirectoryName(((IFileLogger)Log).FilePath); + // FileLogger fileLogger = new FileLogger(filePath, this.TestContext.TestName + ".txt", MessageType.INFORMATION); + + // try + // { + // PlaywrightUtilities.CheckAccessibilityIncomplete(TestObject.WebDriver, fileLogger, MessageType.WARNING, false); + // string logContent = File.ReadAllText(fileLogger.FilePath); + // SoftAssert.Assert(() => Assert.IsTrue(!logContent.Contains("Violations check"), "Did not expect violation check")); + // SoftAssert.Assert(() => Assert.IsTrue(!logContent.Contains("Passes check"), "Did not expect pass check")); + // SoftAssert.Assert(() => Assert.IsTrue(!logContent.Contains("Inapplicable check"), "Did not expect inapplicable check")); + // SoftAssert.Assert(() => Assert.IsTrue(logContent.Contains("Incomplete check"), "Did expect incomplete check")); + // } + // finally + // { + // File.Delete(fileLogger.FilePath); + // } + //} + + ///// + ///// Verify passes only check respected + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void AccessibilityPassesCheckRespectsMessageLevel() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // WebDriver.Wait().ForPageLoad(); + + // string filePath = Path.GetDirectoryName(((IFileLogger)Log).FilePath); + // FileLogger fileLogger = new FileLogger(filePath, this.TestContext.TestName + ".txt", MessageType.INFORMATION); + + // try + // { + // PlaywrightUtilities.CheckAccessibilityPasses(TestObject.WebDriver, fileLogger, MessageType.SUCCESS); + // string logContent = File.ReadAllText(fileLogger.FilePath); + // SoftAssert.Assert(() => Assert.IsTrue(!logContent.Contains("Violations check"), "Did not expect violation check")); + // SoftAssert.Assert(() => Assert.IsTrue(!logContent.Contains("Inapplicable check"), "Did not expect inapplicable check")); + // SoftAssert.Assert(() => Assert.IsTrue(!logContent.Contains("Incomplete check"), "Did not expect incomplete check")); + // SoftAssert.Assert(() => Assert.IsTrue(logContent.Contains("Passes check"), "Did expect pass check")); + // } + // finally + // { + // File.Delete(fileLogger.FilePath); + // } + //} + + ///// + ///// Verify violation only check respected + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void AccessibilityViolationsCheckRespectsMessageLevel() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // WebDriver.Wait().ForPageLoad(); + + // string filePath = Path.GetDirectoryName(((IFileLogger)Log).FilePath); + // FileLogger fileLogger = new FileLogger(filePath, this.TestContext.TestName + ".txt", MessageType.INFORMATION); + + // try + // { + // PlaywrightUtilities.CheckAccessibilityViolations(TestObject.WebDriver, fileLogger, MessageType.ERROR, false); + // string logContent = File.ReadAllText(fileLogger.FilePath); + + // SoftAssert.Assert(() => Assert.IsTrue(!logContent.Contains("Passes check"), "Did not expect pass check")); + // SoftAssert.Assert(() => Assert.IsTrue(!logContent.Contains("Inapplicable check"), "Did not expect inapplicable check")); + // SoftAssert.Assert(() => Assert.IsTrue(!logContent.Contains("Incomplete check"), "Did not expect incomplete check")); + // SoftAssert.Assert(() => Assert.IsTrue(logContent.Contains("Violations check"), "Did expect violation check")); + // } + // finally + // { + // File.Delete(fileLogger.FilePath); + // } + //} + + ///// + ///// Verify accessibility exception will be thrown + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + ////[MyExpectedException(typeof(InvalidOperationException))] //Expected an accessibility exception to be thrown + //public void AccessibilityCheckThrows() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // WebDriver.Wait().ForPageLoad(); + + // Assert.Throws(() => PlaywrightUtilities.CheckAccessibility(this.TestObject, true)); + //} + + ///// + ///// Verify accessibility does not throw when no exception are found + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void AccessibilityCheckNoThrowOnNoResults() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // WebDriver.Wait().ForPageLoad(); + + // // There should be 0 incomplete items found + // PlaywrightUtilities.CheckAccessibilityIncomplete(TestObject.WebDriver, TestObject.Log, MessageType.WARNING, false); + //} + + ///// + ///// Verify we can get readable results directly + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void AccessibilityReadableResults() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // WebDriver.Wait().ForPageLoad(); + + // PlaywrightUtilities.GetReadableAxeResults("TEST", this.WebDriver, this.WebDriver.Analyze().Violations, out string messages); + + // Assert.IsTrue(messages.Contains("TEST check for"), "Expected header."); + // Assert.IsTrue(messages.Contains("Found 6 items"), "Expected to find 6 violations matches."); + //} + + ///// + ///// Driver level accessibility report with no report type filter + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void DriverAccessibilityHtmlWithoutFilter() + //{ + // PageDriver.Goto(TestSiteUrl); + // WebDriver.Wait().ForPageLoad(); + + // var report = File.ReadAllText(WebDriver.CreateAccessibilityHtmlReport(this.TestObject)); + + // Assert.IsTrue(report.Contains("Violation:"), "Expected to have violation check"); + // Assert.IsTrue(report.Contains("Incomplete:"), "Expected to have incomplete check"); + // Assert.IsTrue(report.Contains("Pass:"), "Expected to have pass check"); + // Assert.IsTrue(report.Contains("Inapplicable:"), "Expected to have inapplicable check"); + //} + + ///// + ///// Element level accessibility report with no report type filter + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void ElementAccessibilityHtmlWithoutFilter() + //{ + // PageDriver.Goto(TestSiteUrl); + // WebDriver.Wait().ForPageLoad(); + + // var report = File.ReadAllText(WebDriver.CreateAccessibilityHtmlReport(this.TestObject, WebDriver.FindElement(By.CssSelector("BODY")))); + + // Assert.IsTrue(report.Contains("Violation:"), "Expected to have violation check"); + // Assert.IsTrue(report.Contains("Incomplete:"), "Expected to have incomplete check"); + // Assert.IsTrue(report.Contains("Pass:"), "Expected to have pass check"); + // Assert.IsTrue(report.Contains("Inapplicable:"), "Expected to have inapplicable check"); + //} + + ///// + ///// Driver level accessibility report with report type filter + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void DriverAccessibilityHtmlWithFilter() + //{ + // PageDriver.Goto(TestSiteUrl); + // WebDriver.Wait().ForPageLoad(); + + // var report = File.ReadAllText(WebDriver.CreateAccessibilityHtmlReport(this.TestObject, false, ReportTypes.Violations | ReportTypes.Inapplicable)); + + // Assert.IsTrue(report.Contains("Violation:"), "Expected to have violation check"); + // Assert.IsFalse(report.Contains("Incomplete:"), "Expected not to have incomplete check"); + // Assert.IsFalse(report.Contains("Pass:"), "Expected not to have pass check"); + // Assert.IsTrue(report.Contains("Inapplicable:"), "Expected to have inapplicable check"); + //} + + ///// + ///// Element level accessibility report with report type filter + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void ElementAccessibilityHtmlWithFilter() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // WebDriver.Wait().ForPageLoad(); + + // var report = File.ReadAllText(WebDriver.CreateAccessibilityHtmlReport(this.TestObject, WebDriver.FindElement(By.CssSelector("BODY")), false, ReportTypes.Incomplete)); + + // Assert.IsFalse(report.Contains("Violation:"), "Expected not to have violation check"); + // Assert.IsTrue(report.Contains("Incomplete:"), "Expected to have incomplete check"); + // Assert.IsFalse(report.Contains("Pass:"), "Expected not to have pass check"); + // Assert.IsFalse(report.Contains("Inapplicable:"), "Expected not to have inapplicable check"); + //} + + ///// + ///// Verify we can create and associate an accessibility HTML report + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void AccessibilityHtmlReport() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // WebDriver.Wait().ForPageLoad(); + + // WebDriver.CreateAccessibilityHtmlReport(this.TestObject); + + // string file = this.TestObject.GetArrayOfAssociatedFiles().Last(x => x.EndsWith(".html")); + // Assert.IsTrue(new FileInfo(file).Length > 0, "Accessibility report is empty"); + //} + + ///// + ///// Verify we can create and associate multiple accessibility HTML reports + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void AccessibilityMultipleHtmlReports() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // WebDriver.Wait().ForPageLoad(); + + // // Create 3 reports + // WebDriver.CreateAccessibilityHtmlReport(this.TestObject); + // WebDriver.CreateAccessibilityHtmlReport(this.TestObject); + // WebDriver.CreateAccessibilityHtmlReport(this.TestObject); + + // int count = this.TestObject.GetArrayOfAssociatedFiles().Count(x => x.EndsWith(".html")); + // Assert.IsTrue(count == 3, $"Expected 3 accessibility reports but see {count} instead"); + //} + + ///// + ///// Verify we throw an exception if the scan has an error + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + ////[MyExpectedException(typeof(Exception))] + //public void AccessibilityHtmlReportWithError() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // WebDriver.Wait().ForPageLoad(); + + // Assert.Throws(() => WebDriver.CreateAccessibilityHtmlReport(this.TestObject,true)); + // //WebDriver.CreateAccessibilityHtmlReport(this.TestObject, () => new AxeResult(JObject.Parse(AxeResultWithError))); + // var filelist = this.TestObject.GetArrayOfAssociatedFiles(); + // string file = filelist.Last(x => x.EndsWith(".html")); + // Assert.IsTrue(new FileInfo(file).Length > 0, "Accessibility report is empty"); + //} + + ///// + ///// Verify we throw an exception if the scan has an error and are using lazy elements + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + ////[MyExpectedException(typeof(Exception))] + //public void AccessibilityHtmlReportWithErrorFromLazyElement() + //{ + // PageDriver.Goto(TestSiteUrl); + // WebDriver.Wait().ForPageLoad(); + + // LazyElement foodTable = new LazyElement(this.TestObject, By.Id("FoodTable")); + + // Assert.Throws(() => foodTable.CreateAccessibilityHtmlReport(this.TestObject, () => WebDriver.Analyze(foodTable), true)); + + // string file = this.TestObject.GetArrayOfAssociatedFiles().Last(x => x.EndsWith(".html")); + // Assert.IsTrue(new FileInfo(file).Length > 0, "Accessibility report is empty"); + //} + + ///// + ///// Verify we throw an exception if there are violations and we choose the throw exception option + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + ////[MyExpectedException(typeof(InvalidOperationException))] + //public void AccessibilityHtmlReportWithViolation() + //{ + // PageDriver.Goto(TestSiteAccessibilityUrl); + // WebDriver.Wait().ForPageLoad(); + + // Assert.Throws( () => WebDriver.CreateAccessibilityHtmlReport(this.TestObject, true)); + //} + + ///// + ///// Verify we can create an accessibility HTML report off a lazy element + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void AccessibilityHtmlReportWithLazyElement() + //{ + // PageDriver.Goto(TestSiteAutomationUrl); + // WebDriver.Wait().ForPageLoad(); + + // LazyElement foodTable = new LazyElement(this.TestObject, By.Id("FoodTable")); + + // WebDriver.CreateAccessibilityHtmlReport(this.TestObject, foodTable); + + // string file = this.TestObject.GetArrayOfAssociatedFiles().Last(x => x.EndsWith(".html")); + // Assert.IsTrue(new FileInfo(file).Length > 0, "Accessibility report is empty"); + //} + + ///// + ///// Verify we can create an accessibility HTML report off a normal web element + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void AccessibilityHtmlReportWithElement() + //{ + // PageDriver.Goto(TestSiteAutomationUrl); + // WebDriver.Wait().ForPageLoad(); + + // WebDriver.CreateAccessibilityHtmlReport(this.TestObject, WebDriver.FindElement(By.Id("FoodTable"))); + + // string file = this.TestObject.GetArrayOfAssociatedFiles().Last(x => x.EndsWith(".html")); + // Assert.IsTrue(new FileInfo(file).Length > 0, "Accessibility report is empty"); + //} + + + ///// + ///// Verify we suppress the JS logging assoicated with running Axe + ///// + //[TestMethod] + //[TestCategory(TestCategories.Playwright)] + //public void AccessibilityHtmlLogSuppression() + //{ + // // Make sure we are not using verbose logging + // this.Log.SetLoggingLevel(MessageType.INFORMATION); + + // PageDriver.Goto(TestSiteAutomationUrl); + // WebDriver.Wait().ForPageLoad(); + + // WebDriver.CreateAccessibilityHtmlReport(this.TestObject); + + // // The script executed message should be suppressed when we run the accessablity check + // Assert.IsFalse(File.ReadAllText(((IFileLogger)this.Log).FilePath).Contains("Script executed"), "Logging was not suppressed as expected"); + //} + } +} diff --git a/Framework/SeleniumUnitTests/ActionBuilderUnitTests.cs b/Framework/SeleniumUnitTests/ActionBuilderUnitTests.cs index 00438cb41..aaf6e5329 100644 --- a/Framework/SeleniumUnitTests/ActionBuilderUnitTests.cs +++ b/Framework/SeleniumUnitTests/ActionBuilderUnitTests.cs @@ -194,7 +194,7 @@ public void MoveSliderTest() this.WebDriver.Navigate().GoToUrl(siteAutomationUrl); this.WebDriver.Wait().ForPageLoad(); this.WebDriver.SlideElement(slider, 50); - Assert.AreEqual("4", this.WebDriver.FindElement(sliderLabelNumber).GetAttribute("value")); + Assert.AreEqual("4", this.WebDriver.FindElement(sliderLabelNumber).GetDomProperty("value")); } /// @@ -207,7 +207,7 @@ public void MoveSliderTestLazy() this.WebDriver.Navigate().GoToUrl(siteAutomationUrl); this.WebDriver.Wait().ForPageLoad(); new LazyElement(this.TestObject, slider).SlideElement(50); - Assert.AreEqual("4", this.WebDriver.FindElement(sliderLabelNumber).GetAttribute("value")); + Assert.AreEqual("4", this.WebDriver.FindElement(sliderLabelNumber).GetDomProperty("value")); } /// @@ -323,13 +323,13 @@ public void RightClickToTriggerContextMenuLazy() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(WebDriverTimeoutException), "Right-Click did not raise appropriate exception on element not being found")] + //[MyExpectedException(typeof(WebDriverTimeoutException))] //Right-Click did not raise appropriate exception on element not being found public void RightClickToTriggerContextMenuNotFound() { this.NavigateToUrl(siteAutomationUrl); // Trigger a right click event against non-existent element - this.WebDriver.RightClick(By.CssSelector(".none")); + Assert.Throws(() => this.WebDriver.RightClick(By.CssSelector(".none"))); } /// @@ -337,13 +337,13 @@ public void RightClickToTriggerContextMenuNotFound() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(WebDriverTimeoutException), "Right-Click did not raise appropriate exception on element not being found")] + //[MyExpectedException(typeof(WebDriverTimeoutException))] // Right-Click did not raise appropriate exception on element not being found public void RightClickToTriggerContextMenuNotFoundLazy() { this.NavigateToUrl(siteAutomationUrl); // Trigger a right click event against non-existent element - new LazyElement(this.TestObject, By.CssSelector(".none")).RightClick(); + Assert.Throws(() => new LazyElement(this.TestObject, By.CssSelector(".none")).RightClick()); } /// diff --git a/Framework/SeleniumUnitTests/BaseFrameworkTests.cs b/Framework/SeleniumUnitTests/BaseFrameworkTests.cs index 77615115a..7569c449e 100644 --- a/Framework/SeleniumUnitTests/BaseFrameworkTests.cs +++ b/Framework/SeleniumUnitTests/BaseFrameworkTests.cs @@ -8,6 +8,7 @@ using OpenMAQS.Maqs.BaseTest; using OpenMAQS.Maqs.Utilities.Helper; using Microsoft.VisualStudio.TestTools.UnitTesting; +using MicroAssert = Microsoft.VisualStudio.TestTools.UnitTesting.Assert; using NUnit.Framework; using System.Diagnostics.CodeAnalysis; @@ -36,10 +37,10 @@ public class BaseFrameworkTests : BaseTestUnitTests.BaseFrameworkTests /// [TestMethod] [TestCategory(TestCategories.Framework)] - [ExpectedException(typeof(AssertFailedException))] + //[MyExpectedException(typeof(AssertFailedException))] public new void SoftAssertWithFailure() { - base.SoftAssertWithFailure(); + MicroAssert.Throws(() => base.SoftAssertWithFailure()); } /// diff --git a/Framework/SeleniumUnitTests/ElementHandlerUnitTests.cs b/Framework/SeleniumUnitTests/ElementHandlerUnitTests.cs index 41a13a036..1dd017889 100644 --- a/Framework/SeleniumUnitTests/ElementHandlerUnitTests.cs +++ b/Framework/SeleniumUnitTests/ElementHandlerUnitTests.cs @@ -119,7 +119,7 @@ public void SetTextBoxAndVerifyValueTest() string expectedValue = "Tester"; NavigateToUrl(); WebDriver.SetTextBox(firstNameTextBox, expectedValue); - string actualValue = WebDriver.GetElementAttribute(firstNameTextBox); + string actualValue = WebDriver.GetElementProperty(firstNameTextBox); VerifyText(actualValue, expectedValue); } @@ -134,7 +134,7 @@ public void SetTextBoxAndVerifyValueTestWithLazy() NavigateToUrl(); LazyElement lazy = new LazyElement(this.TestObject, firstNameTextBox); lazy.SetTextBox(expectedValue); - string actualValue = WebDriver.GetElementAttribute(firstNameTextBox); + string actualValue = WebDriver.GetElementProperty(firstNameTextBox); VerifyText(actualValue, expectedValue); } @@ -143,11 +143,11 @@ public void SetTextBoxAndVerifyValueTestWithLazy() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(ArgumentException))] + //[MyExpectedException(typeof(ArgumentException))] public void SetTextBoxThrowException() { NavigateToUrl(); - WebDriver.SetTextBox(firstNameTextBox, string.Empty); + Assert.Throws(() => WebDriver.SetTextBox(firstNameTextBox, string.Empty)); } /// @@ -423,11 +423,11 @@ public void ExecutingScrolling() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(NoSuchElementException), "A JavaScript click that should have failed inappropriately passed.")] + //[MyExpectedException(typeof(NoSuchElementException))] // A JavaScript click that should have failed inappropriately passed. public void ClickElementByJavascriptFromHoverDropdownNotFound() { NavigateToUrl(); - WebDriver.ClickElementByJavaScript(By.CssSelector(".NotPresent")); + Assert.Throws(() => WebDriver.ClickElementByJavaScript(By.CssSelector(".NotPresent"))); } /// @@ -439,7 +439,7 @@ public void SlowTypeTest() { NavigateToUrl(); WebDriver.SlowType(firstNameTextBox, "Test input slowtype"); - Assert.AreEqual("Test input slowtype", WebDriver.Wait().ForClickableElement(firstNameTextBox).GetAttribute("value")); + Assert.AreEqual("Test input slowtype", WebDriver.Wait().ForClickableElement(firstNameTextBox).GetDomProperty("value")); } /// @@ -470,7 +470,7 @@ public void SendSecretTextEnablesLoggingAfterError() { string checkLogged = "THISSHOULDBELOGGED"; NavigateToUrl(); - Assert.ThrowsException(() => this.WebDriver.SendSecretKeys(firstNameTextBox, null, this.Log)); + Assert.ThrowsExactly(() => this.WebDriver.SendSecretKeys(firstNameTextBox, null, this.Log)); this.Log.LogMessage(checkLogged); IFileLogger logger = (IFileLogger)TestObject.Log; diff --git a/Framework/SeleniumUnitTests/LazyElementUnitTests.cs b/Framework/SeleniumUnitTests/LazyElementUnitTests.cs index 5be869e6b..76b858487 100644 --- a/Framework/SeleniumUnitTests/LazyElementUnitTests.cs +++ b/Framework/SeleniumUnitTests/LazyElementUnitTests.cs @@ -194,11 +194,11 @@ public void NavigateToTestPage() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(TimeoutException), "The input should not exist so this will throw an exception.")] + //[MyExpectedException(typeof(TimeoutException))] // The input should not exist so this will throw an exception. public void LazyTimeOutForMissingElement() { this.WebDriver.SetWaitDriver(new OpenQA.Selenium.Support.UI.WebDriverWait(this.WebDriver, TimeSpan.FromSeconds(1))); - Assert.AreEqual("THISCHECKSHOULDFAIL", this.MissingItem.Text); + Assert.Throws(() => Assert.AreEqual("THISCHECKSHOULDFAIL", this.MissingItem.Text)); } /// @@ -206,11 +206,11 @@ public void LazyTimeOutForMissingElement() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(TimeoutException), "The input should be disabled so this will throw an exception.")] + //[MyExpectedException(typeof(TimeoutException))] public void LazyTimeOutForElementInWrongState() { this.WebDriver.SetWaitDriver(new OpenQA.Selenium.Support.UI.WebDriverWait(this.WebDriver, TimeSpan.FromSeconds(1))); - this.DisabledItem.Click(); + Assert.Throws(() => this.DisabledItem.Click()); } /// @@ -288,14 +288,14 @@ public void LazyWithParentAndWithoutMatch() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(TimeoutException), "Finding shadow root should timeout.")] + //[MyExpectedException(typeof(TimeoutException))] public void LazyShadowRootTimeout() { // Create the lazy element and use it LazyElement footer = new LazyElement(this.TestObject, By.CssSelector("FOOTER P"), "Footer"); // Make sure we don't get a shadow root back - Assert.IsNull(footer.GetShadowRoot(), "There is no shadow root so fail"); + Assert.Throws(() => Assert.IsNull(footer.GetShadowRoot(), "There is no shadow root so fail")); } /// @@ -466,11 +466,12 @@ public void LazyElementClear() { // Make sure we can set the value this.InputBox.SendKeys("test"); - Assert.AreEqual("test", this.InputBox.GetAttribute("value")); + string resp = this.InputBox.GetDomProperty("value"); + Assert.AreEqual("test", resp); // Make sure the value is cleared this.InputBox.Clear(); - Assert.AreEqual(string.Empty, this.InputBox.GetAttribute("value")); + Assert.AreEqual(string.Empty, this.InputBox.GetDomProperty("value")); } /// @@ -564,11 +565,11 @@ public void LazyElementSendKeys() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(TimeoutException), "The input should be disabled so this will throw an exception.")] + //[MyExpectedException(typeof(TimeoutException))] public void LazyElementSendKeysWithParent() { this.WebDriver.SetWaitDriver(new OpenQA.Selenium.Support.UI.WebDriverWait(this.WebDriver, TimeSpan.FromSeconds(1))); - this.DisabledInput.SendKeys("test"); + Assert.Throws(() => this.DisabledInput.SendKeys("test")); } /// @@ -578,7 +579,7 @@ public void LazyElementSendKeysWithParent() [TestCategory(TestCategories.Selenium)] public void LazyElementSendKeysWithInteractionNav() { - WebDriver.Navigate().GoToUrl("https://www.google.com/"); + WebDriver.Navigate().GoToUrl("https://www.bing.com/"); LazyElement lazyRoot = new LazyElement(this.TestObject, By.Name("q")); lazyRoot.SendKeys("SEARCH" + Keys.Enter); Assert.AreEqual("SEARCH", lazyRoot.GetValue()); @@ -591,9 +592,9 @@ public void LazyElementSendKeysWithInteractionNav() [TestCategory(TestCategories.Selenium)] public void LazyElementSendKeysWithInteractionNavComplex() { - WebDriver.Navigate().GoToUrl("https://www.google.com/"); + WebDriver.Navigate().GoToUrl("https://www.bing.com/"); LazyElement lazyRoot = new LazyElement(this.TestObject, By.Name("q")); - lazyRoot.SendKeys("SEARCH" + Keys.Tab + "TXT"); + lazyRoot.SendKeys("SEARCH" + Keys.Tab + Keys.Tab + "TXT"); Assert.AreEqual("SEARCH", lazyRoot.GetValue()); } @@ -668,11 +669,11 @@ public void LazyElementSubmit() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(TimeoutException), "The input should be disabled so this will throw an exception.")] + //[MyExpectedException(typeof(TimeoutException))] public void LazyElementSubmitWithParent() { this.WebDriver.SetWaitDriver(new OpenQA.Selenium.Support.UI.WebDriverWait(this.WebDriver, TimeSpan.FromSeconds(1))); - this.DisabledInput.Submit(); + Assert.Throws(() => this.DisabledInput.Submit()); } /// @@ -1077,12 +1078,12 @@ public void LazyElementFindElement() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(TimeoutException), "The input should be disabled so this will throw an exception.")] + //[MyExpectedException(typeof(TimeoutException))] // The input should be disabled so this will throw an exception. public void LazyElementFindElementRespectAction() { IWebElement firstElement = this.DivRoot.FindElement(this.DisabledItem.By); this.WebDriver.SetWaitDriver(new OpenQA.Selenium.Support.UI.WebDriverWait(this.WebDriver, TimeSpan.FromSeconds(1))); - firstElement.Click(); + Assert.Throws(() => firstElement.Click()); } /// @@ -1133,7 +1134,7 @@ public void LazyElementFindElementsAreLazy() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(TimeoutException), "The input should be disabled so this will throw an exception.")] + //[MyExpectedException(typeof(TimeoutException))] public void LazyElementFindElementsRespectAction() { IWebElement firstElement = this.DivRoot.FindElements(this.DisabledItem.By)[0]; @@ -1142,7 +1143,7 @@ public void LazyElementFindElementsRespectAction() this.WebDriver.Navigate().GoToUrl(SeleniumConfig.GetWebSiteBase()); this.WebDriver.SetWaitDriver(new OpenQA.Selenium.Support.UI.WebDriverWait(this.WebDriver, TimeSpan.FromSeconds(1))); - firstElement.Click(); + Assert.Throws(() => firstElement.Click()); } /// diff --git a/Framework/SeleniumUnitTests/SeleniumConfigTests.cs b/Framework/SeleniumUnitTests/SeleniumConfigTests.cs index adf169bcd..c15524cdb 100644 --- a/Framework/SeleniumUnitTests/SeleniumConfigTests.cs +++ b/Framework/SeleniumUnitTests/SeleniumConfigTests.cs @@ -113,15 +113,15 @@ public void ResizeBrowserWindowMaximize() [TestCategory(TestCategories.Selenium)] [DataRow(true)] [DataRow(false)] - [ExpectedException(typeof(WebDriverException))] + //[MyExpectedException(typeof(WebDriverException))] public void RetryRefused(bool retry) { - WebDriverFactory.CreateDriver(() => + Assert.Throws(() => WebDriverFactory.CreateDriver(() => { throw new WebDriverTimeoutException("refused"); - }, retry); + }, retry)); - Assert.Fail("Exception should have been thrown "); + //Assert.Fail("Exception should have been thrown "); } /// @@ -336,35 +336,31 @@ public void GetBrowserWithString() /// Verify that correct exception is returned when unrecognizable remote browser is found /// [TestMethod] - [ExpectedException(typeof(ArgumentException))] + //[MyExpectedException(typeof(ArgumentException))] [DoNotParallelize] public void GetBrowserRemoteThrowException() { string hubUrl = Config.GetGeneralValue("HubUrl"); string remoteBrowser = Config.GetGeneralValue("RemoteBrowser"); - try - { - Config.AddTestSettingValues( - new Dictionary - { - { "HubUrl", "http://localhost:4444/wd/hub" }, - { "RemoteBrowser", "NoBrowser" } - }, - "SeleniumMaqs"); + Config.AddTestSettingValues( + new Dictionary + { + { "HubUrl", "http://localhost:4444/wd/hub" }, + { "RemoteBrowser", "NoBrowser" } + }, + "SeleniumMaqs"); + + Assert.Throws(() => WebDriverFactory.GetBrowserWithDefaultConfiguration(BrowserType.Remote)); + + Config.AddTestSettingValues( + new Dictionary + { + { "HubUrl", hubUrl }, + { "RemoteBrowser", remoteBrowser } + }, + "SeleniumMaqs"); - WebDriverFactory.GetBrowserWithDefaultConfiguration(BrowserType.Remote); - } - finally - { - Config.AddTestSettingValues( - new Dictionary - { - { "HubUrl", hubUrl }, - { "RemoteBrowser", remoteBrowser } - }, - "SeleniumMaqs"); - } } /// @@ -439,10 +435,10 @@ public void BrowserTypeMatch() [TestMethod] public void BrowserTypeError() { - Assert.ThrowsException(() => SeleniumConfig.GetBrowserType("PHANTOMJS")); - Assert.ThrowsException(() => SeleniumConfig.GetBrowserType("PHANTOM JS")); - Assert.ThrowsException(() => SeleniumConfig.GetBrowserType("PHANTOM")); - Assert.ThrowsException(() => SeleniumConfig.GetBrowserType("OTHER")); + Assert.Throws(() => SeleniumConfig.GetBrowserType("PHANTOMJS")); + Assert.Throws(() => SeleniumConfig.GetBrowserType("PHANTOM JS")); + Assert.Throws(() => SeleniumConfig.GetBrowserType("PHANTOM")); + Assert.Throws(() => SeleniumConfig.GetBrowserType("OTHER")); } /// @@ -466,10 +462,10 @@ public void RemoteBrowserTypeMatch() [TestMethod] public void RemoteBrowserTypeError() { - Assert.ThrowsException(() => SeleniumConfig.GetRemoteBrowserType("remote")); - Assert.ThrowsException(() => SeleniumConfig.GetRemoteBrowserType("HEADLESSCHROME")); - Assert.ThrowsException(() => SeleniumConfig.GetRemoteBrowserType("PHANTOM")); - Assert.ThrowsException(() => SeleniumConfig.GetRemoteBrowserType("OTHER")); + Assert.Throws(() => SeleniumConfig.GetRemoteBrowserType("remote")); + Assert.Throws(() => SeleniumConfig.GetRemoteBrowserType("HEADLESSCHROME")); + Assert.Throws(() => SeleniumConfig.GetRemoteBrowserType("PHANTOM")); + Assert.Throws(() => SeleniumConfig.GetRemoteBrowserType("OTHER")); } /// @@ -547,7 +543,7 @@ public void OpenIEBrowser() [TestMethod] [DoNotParallelize] - [ExpectedException(typeof(ArgumentException))] + //[MyExpectedException(typeof(ArgumentException))] public void CommandTimeoutNotANumberException() { string commandTimeout = Config.GetValueForSection(ConfigSection.SeleniumMaqs, "SeleniumCommandTimeout"); @@ -559,23 +555,13 @@ public void CommandTimeoutNotANumberException() }, "SeleniumMaqs"); - try - { - var commandTimeoutFromMethod = SeleniumConfig.GetCommandTimeout(); - Assert.Fail($"We should throw an argument exception before we get to this assert. Value was {commandTimeoutFromMethod}"); - - - } - finally - { - Config.AddTestSettingValues( - new Dictionary - { - - { "SeleniumCommandTimeout", commandTimeout } - }, - "SeleniumMaqs"); - } + var commandTimeoutFromMethod = Assert.Throws(() => SeleniumConfig.GetCommandTimeout()); + Config.AddTestSettingValues( + new Dictionary + { + { "SeleniumCommandTimeout", commandTimeout } + }, + "SeleniumMaqs"); } /// diff --git a/Framework/SeleniumUnitTests/SeleniumNUnitTest.cs b/Framework/SeleniumUnitTests/SeleniumNUnitTest.cs index f83e4fc9c..3147368aa 100644 --- a/Framework/SeleniumUnitTests/SeleniumNUnitTest.cs +++ b/Framework/SeleniumUnitTests/SeleniumNUnitTest.cs @@ -32,7 +32,7 @@ public class SeleniumNUnitTest : BaseSeleniumTest [Category(TestCategories.NUnit)] public void OpenBrowser() { - this.WebDriver.Navigate().GoToUrl("https://www.google.com"); + this.WebDriver.Navigate().GoToUrl("https://www.bing.com"); } /// diff --git a/Framework/SeleniumUnitTests/SeleniumPageObjectUnitTests.cs b/Framework/SeleniumUnitTests/SeleniumPageObjectUnitTests.cs index 43adf4280..299cc18db 100644 --- a/Framework/SeleniumUnitTests/SeleniumPageObjectUnitTests.cs +++ b/Framework/SeleniumUnitTests/SeleniumPageObjectUnitTests.cs @@ -10,6 +10,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using OpenQA.Selenium; using System.Diagnostics.CodeAnalysis; +using System; namespace SeleniumUnitTests { @@ -48,6 +49,7 @@ public void PageModelTestObject() [TestCategory(TestCategories.Selenium)] public void PageModelWebDriver() { + Log.LogMessage($"SystemType: {typeof(AggregateException)}"); Assert.AreEqual(this.WebDriver, this.getPageModel().GetWebDriver()); } diff --git a/Framework/SeleniumUnitTests/SeleniumUnitTest.cs b/Framework/SeleniumUnitTests/SeleniumUnitTest.cs index 363164f61..d89aaa20a 100644 --- a/Framework/SeleniumUnitTests/SeleniumUnitTest.cs +++ b/Framework/SeleniumUnitTests/SeleniumUnitTest.cs @@ -171,13 +171,13 @@ public void WaitForAbsentElement() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(TimeoutException))] + //[MyExpectedException(typeof(TimeoutException))] public void WaitForAbsentElementFail() { WebDriver.Navigate().GoToUrl(TestSiteUrl); WebDriver.Wait().ForPageLoad(); WebDriver.SetWaitDriver(new WebDriverWait(new SystemClock(), WebDriver, TimeSpan.FromMilliseconds(100), TimeSpan.FromMilliseconds(10))); - WebDriver.Wait().ForAbsentElement(HomeButtonCssSelector); + Assert.Throws(() => WebDriver.Wait().ForAbsentElement(HomeButtonCssSelector)); } /// @@ -426,13 +426,14 @@ public void WaitUntilAbsentElement() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(NotFoundException))] + //[MyExpectedException(typeof(NotFoundException))] public void ElemListThrowException() { WebDriver.Navigate().GoToUrl(TestSiteAutomationUrl); - IWebElement element = WebDriver.Find().Element(NotInPage); - Assert.Fail($"Test should have thrown an unfound error, but found element {element} instead"); + Assert.Throws(() => WebDriver.Find().Elements(NotInPage)); + + //Assert.Fail($"Test should have thrown an unfound error, but found element {element} instead"); } /// @@ -494,13 +495,13 @@ public void FindElementsNotFound() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(NotFoundException))] + //[MyExpectedException(typeof(NotFoundException))] public void FindElementsNotFoundThrowException() { WebDriver.Navigate().GoToUrl(TestSiteAutomationUrl); WebDriver.Wait().ForPageLoad(); WebDriver.SetWaitDriver(new WebDriverWait(new SystemClock(), WebDriver, TimeSpan.FromMilliseconds(100), TimeSpan.FromMilliseconds(10))); - WebDriver.Find().Elements(NotInPage); + Assert.Throws(() => WebDriver.Find().Elements(NotInPage)); } /// @@ -604,12 +605,12 @@ public void FindIndexOfElementInCollectionNotFound() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(NotFoundException))] + //[MyExpectedException(typeof(NotFoundException))] public void FindIndexOfElementInCollectionEmptyInputList() { WebDriver.Navigate().GoToUrl(TestSiteAutomationUrl); WebDriver.Wait().ForPageLoad(); - Find.IndexOfElementWithText(new List(), "#notfound", true); + Assert.Throws(() => Find.IndexOfElementWithText(new List(), "#notfound", true)); } /// @@ -617,12 +618,12 @@ public void FindIndexOfElementInCollectionEmptyInputList() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(NotFoundException))] + //[MyExpectedException(typeof(NotFoundException))] public void FindIndexOfElementInCollectionTextNotFoundAssertIsTrue() { WebDriver.Navigate().GoToUrl(TestSiteAutomationUrl); WebDriver.Wait().ForPageLoad(); - Find.IndexOfElementWithText(WebDriver.FindElements(FlowerTable), "#notfound", true); + Assert.Throws(() => Find.IndexOfElementWithText(WebDriver.FindElements(FlowerTable), "#notfound", true)); } /// @@ -682,14 +683,14 @@ public void SeleniumSoftAssertEmptyMessageTest() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(AggregateException))] + //[MyExpectedException(typeof(AggregateException))] public void SeleniumSoftAssertIsTrueFalseBoolean() { WebDriver.Navigate().GoToUrl(TestSiteAutomationUrl); WebDriver.Wait().ForPageLoad(); var result = SoftAssert.Assert(() => Assert.IsTrue(!WebDriver.Title.Contains("Automation"), "", "Title is incorrect")); Assert.IsFalse(result); - this.SoftAssert.FailTestIfAssertFailed(); + Assert.Throws(() => this.SoftAssert.FailTestIfAssertFailed()); } /// @@ -879,13 +880,13 @@ public void SeleniumSoftAssertAreEqual() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(AggregateException))] + //[MyExpectedException(typeof(AggregateException))] public void SeleniumSoftAssertExpectFail() { WebDriver.Navigate().GoToUrl(TestSiteAutomationUrl); WebDriver.Wait().ForPageLoad(); SoftAssert.Assert(() => Assert.AreEqual("Wrong Title", WebDriver.Title), "Title Test", "Title is incorrect"); - SoftAssert.FailTestIfAssertFailed(); + Assert.Throws(() => SoftAssert.FailTestIfAssertFailed()); } /// @@ -893,11 +894,11 @@ public void SeleniumSoftAssertExpectFail() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(NotFoundException), "An attribute check that should have failed to find the given string within an elements attribute passed.")] + //[MyExpectedException(typeof(NotFoundException))] // An attribute check that should have failed to find the given string within an elements attribute passed. public void WaitForAttributeContainsDontFind() { WebDriver.Navigate().GoToUrl(TestSiteAutomationUrl); - WebDriver.Wait().ForAttributeTextContains(FoodTable, "Flower Table", "Summary"); + Assert.Throws(() => WebDriver.Wait().ForAttributeTextContains(FoodTable, "Flower Table", "Summary")); } /// @@ -905,11 +906,11 @@ public void WaitForAttributeContainsDontFind() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(NotFoundException), "An attribute check that should have failed to find the given string equal to an elements attribute passed.")] + //[MyExpectedException(typeof(NotFoundException))] // An attribute check that should have failed to find the given string equal to an elements attribute passed. public void WaitForAttributeEqualsDontFind() { WebDriver.Navigate().GoToUrl(TestSiteAutomationUrl); - WebDriver.Wait().ForAttributeTextEquals(FoodTable, "Flower Table", "Summary"); + Assert.Throws(() => WebDriver.Wait().ForAttributeTextEquals(FoodTable, "Flower Table", "Summary")); } /// diff --git a/Framework/SeleniumUnitTests/SeleniumUnitTests.csproj b/Framework/SeleniumUnitTests/SeleniumUnitTests.csproj index e1ec52d99..d0ab7023b 100644 --- a/Framework/SeleniumUnitTests/SeleniumUnitTests.csproj +++ b/Framework/SeleniumUnitTests/SeleniumUnitTests.csproj @@ -1,7 +1,7 @@ - + - net6.0 + net8.0 false @@ -11,17 +11,17 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - - - + + + + + + + diff --git a/Framework/SeleniumUnitTests/SeleniumUtilsTest.cs b/Framework/SeleniumUnitTests/SeleniumUtilsTest.cs index e3228c497..ddcb4632a 100644 --- a/Framework/SeleniumUnitTests/SeleniumUtilsTest.cs +++ b/Framework/SeleniumUnitTests/SeleniumUtilsTest.cs @@ -19,6 +19,7 @@ using Deque.AxeCore.Selenium; using TWP.Selenium.Axe.Html; using Deque.AxeCore.Commons; +using AngleSharp.Dom; namespace SeleniumUnitTests { @@ -570,13 +571,13 @@ public void AccessibilityViolationsCheckRespectsMessageLevel() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(InvalidOperationException), "Expected an accessibility exception to be thrown")] + //[MyExpectedException(typeof(InvalidOperationException))] //Expected an accessibility exception to be thrown public void AccessibilityCheckThrows() { WebDriver.Navigate().GoToUrl(TestSiteAccessibilityUrl); WebDriver.Wait().ForPageLoad(); - SeleniumUtilities.CheckAccessibility(this.TestObject, true); + Assert.Throws(() => SeleniumUtilities.CheckAccessibility(this.TestObject, true)); } /// @@ -721,15 +722,16 @@ public void AccessibilityMultipleHtmlReports() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(Exception))] + //[MyExpectedException(typeof(Exception))] public void AccessibilityHtmlReportWithError() { WebDriver.Navigate().GoToUrl(TestSiteAccessibilityUrl); WebDriver.Wait().ForPageLoad(); - WebDriver.CreateAccessibilityHtmlReport(this.TestObject, () => new AxeResult(JObject.Parse(AxeResultWithError))); - - string file = this.TestObject.GetArrayOfAssociatedFiles().Last(x => x.EndsWith(".html")); + Assert.Throws(() => WebDriver.CreateAccessibilityHtmlReport(this.TestObject,true)); + //WebDriver.CreateAccessibilityHtmlReport(this.TestObject, () => new AxeResult(JObject.Parse(AxeResultWithError))); + var filelist = this.TestObject.GetArrayOfAssociatedFiles(); + string file = filelist.Last(x => x.EndsWith(".html")); Assert.IsTrue(new FileInfo(file).Length > 0, "Accessibility report is empty"); } @@ -738,7 +740,7 @@ public void AccessibilityHtmlReportWithError() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(Exception))] + //[MyExpectedException(typeof(Exception))] public void AccessibilityHtmlReportWithErrorFromLazyElement() { WebDriver.Navigate().GoToUrl(TestSiteUrl); @@ -746,7 +748,7 @@ public void AccessibilityHtmlReportWithErrorFromLazyElement() LazyElement foodTable = new LazyElement(this.TestObject, By.Id("FoodTable")); - foodTable.CreateAccessibilityHtmlReport(this.TestObject, () => new AxeResult(JObject.Parse(AxeResultWithError))); + Assert.Throws(() => foodTable.CreateAccessibilityHtmlReport(this.TestObject, () => WebDriver.Analyze(foodTable), true)); string file = this.TestObject.GetArrayOfAssociatedFiles().Last(x => x.EndsWith(".html")); Assert.IsTrue(new FileInfo(file).Length > 0, "Accessibility report is empty"); @@ -757,13 +759,13 @@ public void AccessibilityHtmlReportWithErrorFromLazyElement() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(InvalidOperationException))] + //[MyExpectedException(typeof(InvalidOperationException))] public void AccessibilityHtmlReportWithViolation() { WebDriver.Navigate().GoToUrl(TestSiteAccessibilityUrl); WebDriver.Wait().ForPageLoad(); - WebDriver.CreateAccessibilityHtmlReport(this.TestObject, true); + Assert.Throws( () => WebDriver.CreateAccessibilityHtmlReport(this.TestObject, true)); } /// diff --git a/Framework/SeleniumUnitTests/SeleniumWebElementTest.cs b/Framework/SeleniumUnitTests/SeleniumWebElementTest.cs index 9e057f5a2..2e5ee29d6 100644 --- a/Framework/SeleniumUnitTests/SeleniumWebElementTest.cs +++ b/Framework/SeleniumUnitTests/SeleniumWebElementTest.cs @@ -204,14 +204,14 @@ public void WaitForAbsentElement() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(TimeoutException))] + //[MyExpectedException(typeof(TimeoutException))] public void WaitForAbsentElementFail() { this.WebDriver.Navigate().GoToUrl(TestSiteAutomationUrl); this.WebDriver.Wait().ForPageLoad(); this.WebDriver.SetWaitDriver(new WebDriverWait(new SystemClock(), this.WebDriver, TimeSpan.FromMilliseconds(100), TimeSpan.FromMilliseconds(10))); IWebElement element = this.WebDriver.Wait().ForVisibleElement(BodyCssSelector); - element.Wait().ForAbsentElement(HomeButtonCssSelector); + Assert.Throws( () => element.Wait().ForAbsentElement(HomeButtonCssSelector)); } /// @@ -311,12 +311,12 @@ public void WaitUntilAbsentElement() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(NotFoundException), "An attribute check that should have failed to find the given string within an elements attribute passed.")] + //[MyExpectedException(typeof(NotFoundException))] //An attribute check that should have failed to find the given string within an elements attribute passed. public void WaitForAttributeContainsDontFind() { this.WebDriver.Navigate().GoToUrl(TestSiteAutomationUrl); IWebElement element = this.WebDriver.Wait().ForVisibleElement(BodyCssSelector); - element.Wait().ForAttributeTextContains(FoodTable, "Flower Table", "Summary"); + Assert.Throws(() => element.Wait().ForAttributeTextContains(FoodTable, "Flower Table", "Summary")); } /// @@ -324,12 +324,12 @@ public void WaitForAttributeContainsDontFind() /// [TestMethod] [TestCategory(TestCategories.Selenium)] - [ExpectedException(typeof(NotFoundException), "An attribute check that should have failed to find the given string equal to an elements attribute passed.")] + //[MyExpectedException(typeof(NotFoundException))] // An attribute check that should have failed to find the given string equal to an elements attribute passed. public void WaitForAttributeEqualsDontFind() { this.WebDriver.Navigate().GoToUrl(TestSiteAutomationUrl); IWebElement element = this.WebDriver.Wait().ForVisibleElement(BodyCssSelector); - element.Wait().ForAttributeTextEquals(FoodTable, "Flower Table", "Summary"); + Assert.Throws(() => element.Wait().ForAttributeTextEquals(FoodTable, "Flower Table", "Summary")); } /// diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/AppiumFeature.feature.cs b/Framework/SpecFlowExtensionNUnitTests/Features/AppiumFeature.feature.cs deleted file mode 100644 index 6f6906553..000000000 --- a/Framework/SpecFlowExtensionNUnitTests/Features/AppiumFeature.feature.cs +++ /dev/null @@ -1,116 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtensionNUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("AppiumFeature")] - public partial class AppiumFeatureFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "AppiumFeature.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "AppiumFeature", "\tAppium Tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Driver in BaseAppiumTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_Appium")] - public void DriverInBaseAppiumTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Appium"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Driver in BaseAppiumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseAppiumTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BaseAppiumTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("TestObject is type AppiumTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 9 - testRunner.And("BaseAppiumTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 10 - testRunner.And("BaseAppiumTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/DatabaseFeature.feature.cs b/Framework/SpecFlowExtensionNUnitTests/Features/DatabaseFeature.feature.cs deleted file mode 100644 index b278e6cd1..000000000 --- a/Framework/SpecFlowExtensionNUnitTests/Features/DatabaseFeature.feature.cs +++ /dev/null @@ -1,110 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtensionNUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("DatabaseFeature")] - public partial class DatabaseFeatureFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "DatabaseFeature.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "DatabaseFeature", "\tDatabase Tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("DatabaseDriver Available BaseDatabaseTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_Database")] - public void DatabaseDriverAvailableBaseDatabaseTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Database"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("DatabaseDriver Available BaseDatabaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseDatabaseTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("DatabaseDriver is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("DatabaseDriver is type DatabaseConnectionDriver", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/EmailFeature.feature.cs b/Framework/SpecFlowExtensionNUnitTests/Features/EmailFeature.feature.cs deleted file mode 100644 index 3a9c46966..000000000 --- a/Framework/SpecFlowExtensionNUnitTests/Features/EmailFeature.feature.cs +++ /dev/null @@ -1,113 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtensionNUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("EmailFeature")] - public partial class EmailFeatureFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "EmailFeature.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "EmailFeature", "\tEmail Tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("EmailDriver Available BaseEmailTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_Email")] - public void EmailDriverAvailableBaseEmailTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Email"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("EmailDriver Available BaseEmailTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseEmailTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BaseEmailTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("TestObject is type EmailTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 9 - testRunner.And("BaseEmailTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/PlaywrightFeature.feature.cs b/Framework/SpecFlowExtensionNUnitTests/Features/PlaywrightFeature.feature.cs deleted file mode 100644 index 15a17533b..000000000 --- a/Framework/SpecFlowExtensionNUnitTests/Features/PlaywrightFeature.feature.cs +++ /dev/null @@ -1,119 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtensionNUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("PlaywrightFeature")] - public partial class PlaywrightFeatureFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "PlaywrightFeature.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "PlaywrightFeature", "\tPlaywright Tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Driver in BasePlaywrightTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_Playwright")] - public void DriverInBasePlaywrightTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Playwright"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Driver in BasePlaywrightTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BasePlaywrightTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BasePlaywrightTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("TestObject is type PlaywrightTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 9 - testRunner.And("BasePlaywrightTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 10 - testRunner.And("BasePlaywrightTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 11 - testRunner.And("BasePlaywrightTestSteps Null driver is null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/ScenarioContextFeature.feature.cs b/Framework/SpecFlowExtensionNUnitTests/Features/ScenarioContextFeature.feature.cs deleted file mode 100644 index 8f910fc93..000000000 --- a/Framework/SpecFlowExtensionNUnitTests/Features/ScenarioContextFeature.feature.cs +++ /dev/null @@ -1,238 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtensionNUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("ScenarioContextFeature")] - public partial class ScenarioContextFeatureFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "ScenarioContextFeature.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "ScenarioContextFeature", "\tScenarioContext tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("ScenarioContext Available BaseTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_General")] - public void ScenarioContextAvailableBaseTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_General"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("ScenarioContext Available BaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BaseTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("ScenarioContext Available BaseSeleniumTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_Selenium")] - public void ScenarioContextAvailableBaseSeleniumTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Selenium"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("ScenarioContext Available BaseSeleniumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 11 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 12 - testRunner.Given("class BaseSeleniumTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 13 - testRunner.Then("BaseSeleniumTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 14 - testRunner.And("BaseSeleniumTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("ScenarioContext Available BaseWebServiceTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_WebService")] - public void ScenarioContextAvailableBaseWebServiceTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_WebService"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("ScenarioContext Available BaseWebServiceTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 17 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 18 - testRunner.Given("class BaseWebServiceTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 19 - testRunner.Then("BaseWebServiceTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 20 - testRunner.And("BaseWebServiceTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("ScenarioContext Available BaseEmailTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_Email")] - public void ScenarioContextAvailableBaseEmailTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Email"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("ScenarioContext Available BaseEmailTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 23 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 24 - testRunner.Given("class BaseEmailTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 25 - testRunner.Then("BaseEmailTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 26 - testRunner.And("BaseEmailTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("ScenarioContext Available BaseDatabaseTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_Database")] - public void ScenarioContextAvailableBaseDatabaseTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Database"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("ScenarioContext Available BaseDatabaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 29 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 30 - testRunner.Given("class BaseDatabaseTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 31 - testRunner.Then("BaseDatabaseTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 32 - testRunner.And("BaseDatabaseTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/SeleniumFeature.feature.cs b/Framework/SpecFlowExtensionNUnitTests/Features/SeleniumFeature.feature.cs deleted file mode 100644 index 4d9b5c10d..000000000 --- a/Framework/SpecFlowExtensionNUnitTests/Features/SeleniumFeature.feature.cs +++ /dev/null @@ -1,110 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtensionNUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("SeleniumFeature")] - public partial class SeleniumFeatureFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "SeleniumFeature.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "SeleniumFeature", "\tSelenium Tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("WebDriver Available BaseSeleniumTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_Selenium")] - public void WebDriverAvailableBaseSeleniumTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Selenium"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("WebDriver Available BaseSeleniumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseSeleniumTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BaseSeleniumTestSteps WebDriver is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("WebDriver is type EventFiringWebDriver", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/TestObjectFeature.feature.cs b/Framework/SpecFlowExtensionNUnitTests/Features/TestObjectFeature.feature.cs deleted file mode 100644 index ebfbe5daf..000000000 --- a/Framework/SpecFlowExtensionNUnitTests/Features/TestObjectFeature.feature.cs +++ /dev/null @@ -1,238 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtensionNUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("TestObjectFeature")] - public partial class TestObjectFeatureFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "TestObjectFeature.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "TestObjectFeature", "\tTestObject is available", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("TestObject Available BaseTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_General")] - public void TestObjectAvailableBaseTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_General"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("TestObject Available BaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BaseTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("TestObject is type BaseTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("TestObject Available BaseSeleniumTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_Selenium")] - public void TestObjectAvailableBaseSeleniumTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Selenium"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("TestObject Available BaseSeleniumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 11 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 12 - testRunner.Given("class BaseSeleniumTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 13 - testRunner.Then("BaseSeleniumTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 14 - testRunner.And("TestObject is type ISeleniumTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("TestObject Available BaseWebServiceTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_WebService")] - public void TestObjectAvailableBaseWebServiceTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_WebService"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("TestObject Available BaseWebServiceTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 17 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 18 - testRunner.Given("class BaseWebServiceTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 19 - testRunner.Then("BaseWebServiceTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 20 - testRunner.And("TestObject is type WebServiceTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("TestObject Available BaseEmailTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_Email")] - public void TestObjectAvailableBaseEmailTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Email"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("TestObject Available BaseEmailTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 23 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 24 - testRunner.Given("class BaseEmailTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 25 - testRunner.Then("BaseEmailTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 26 - testRunner.And("TestObject is type EmailTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("TestObject Available BaseDatabaseTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_Database")] - public void TestObjectAvailableBaseDatabaseTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Database"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("TestObject Available BaseDatabaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 29 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 30 - testRunner.Given("class BaseDatabaseTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 31 - testRunner.Then("BaseDatabaseTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 32 - testRunner.And("TestObject is type DatabaseTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/Features/WebServiceFeature.feature.cs b/Framework/SpecFlowExtensionNUnitTests/Features/WebServiceFeature.feature.cs deleted file mode 100644 index 7e2461c66..000000000 --- a/Framework/SpecFlowExtensionNUnitTests/Features/WebServiceFeature.feature.cs +++ /dev/null @@ -1,110 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtensionNUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("WebServiceFeature")] - public partial class WebServiceFeatureFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "WebServiceFeature.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "WebServiceFeature", "\tWeb Service Tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("WebServiceDriver Available BaseWebServiceTestSteps")] - [NUnit.Framework.CategoryAttribute("MAQS_WebService")] - public void WebServiceDriverAvailableBaseWebServiceTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_WebService"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("WebServiceDriver Available BaseWebServiceTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseWebServiceTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BaseWebServiceTestSteps WebServiceDriver is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("BaseWebServiceTestSteps WebServiceDriver is type EventFiringWebServiceDriver", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionNUnitTests/GherkinExtensionNUnitTests.csproj b/Framework/SpecFlowExtensionNUnitTests/GherkinExtensionNUnitTests.csproj new file mode 100644 index 000000000..d4e7b8632 --- /dev/null +++ b/Framework/SpecFlowExtensionNUnitTests/GherkinExtensionNUnitTests.csproj @@ -0,0 +1,46 @@ + + + + net8.0 + + false + + GherkinExtensionNUnitTests + + GherkinExtensionNUnitTests + + true + true + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + + + + + + + + + + + + + Always + + + + + diff --git a/Framework/SpecFlowExtensionNUnitTests/SpecFlowExtensionNUnitTests.csproj b/Framework/SpecFlowExtensionNUnitTests/SpecFlowExtensionNUnitTests.csproj deleted file mode 100644 index c21e1b8e6..000000000 --- a/Framework/SpecFlowExtensionNUnitTests/SpecFlowExtensionNUnitTests.csproj +++ /dev/null @@ -1,87 +0,0 @@ - - - - net6.0 - - false - - SpecFlowExtensionNUnitTests - - SpecFlowExtensionNUnitTests - - true - true - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - - - - - - - Always - - - - - - - PlaywrightFeature.feature - - - %(Filename) - - - - - - $(UsingMicrosoftNETSdk) - %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) - SpecFlowSingleFileGenerator - - - $(UsingMicrosoftNETSdk) - %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) - SpecFlowSingleFileGenerator - - - SpecFlowSingleFileGenerator - - - SpecFlowSingleFileGenerator - - - SpecFlowSingleFileGenerator - ScenarioContextFeature.feature.cs - - - SpecFlowSingleFileGenerator - - - SpecFlowSingleFileGenerator - - - SpecFlowSingleFileGenerator - - - - diff --git a/Framework/SpecFlowExtensionUnitTests/Features/AppiumFeature.feature.cs b/Framework/SpecFlowExtensionUnitTests/Features/AppiumFeature.feature.cs deleted file mode 100644 index 444a890e1..000000000 --- a/Framework/SpecFlowExtensionUnitTests/Features/AppiumFeature.feature.cs +++ /dev/null @@ -1,135 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] - public partial class AppiumFeatureFeature - { - - private static TechTalk.SpecFlow.ITestRunner testRunner; - - private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "AppiumFeature.feature" -#line hidden - - public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext - { - get - { - return this._testContext; - } - set - { - this._testContext = value; - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] - public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "AppiumFeature", "\tAppium Tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] - public static void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] - public void TestInitialize() - { - if (((testRunner.FeatureContext != null) - && (testRunner.FeatureContext.FeatureInfo.Title != "AppiumFeature"))) - { - global::SpecFlowExtUnitTests.Features.AppiumFeatureFeature.FeatureSetup(null); - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BaseAppiumTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "AppiumFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Appium")] - public void DriverInBaseAppiumTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Appium"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Driver in BaseAppiumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseAppiumTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BaseAppiumTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("TestObject is type AppiumTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 9 - testRunner.And("BaseAppiumTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 10 - testRunner.And("BaseAppiumTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/DatabaseFeature.feature.cs b/Framework/SpecFlowExtensionUnitTests/Features/DatabaseFeature.feature.cs deleted file mode 100644 index a56833f80..000000000 --- a/Framework/SpecFlowExtensionUnitTests/Features/DatabaseFeature.feature.cs +++ /dev/null @@ -1,129 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] - public partial class DatabaseFeatureFeature - { - - private static TechTalk.SpecFlow.ITestRunner testRunner; - - private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "DatabaseFeature.feature" -#line hidden - - public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext - { - get - { - return this._testContext; - } - set - { - this._testContext = value; - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] - public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "DatabaseFeature", "\tDatabase Tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] - public static void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] - public void TestInitialize() - { - if (((testRunner.FeatureContext != null) - && (testRunner.FeatureContext.FeatureInfo.Title != "DatabaseFeature"))) - { - global::SpecFlowExtUnitTests.Features.DatabaseFeatureFeature.FeatureSetup(null); - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BaseDatabaseTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "DatabaseFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Database")] - public void DriverInBaseDatabaseTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Database"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Driver in BaseDatabaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseDatabaseTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("DatabaseDriver is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("DatabaseDriver is type DatabaseConnectionDriver", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/EmailFeature.feature.cs b/Framework/SpecFlowExtensionUnitTests/Features/EmailFeature.feature.cs deleted file mode 100644 index ca270c2d2..000000000 --- a/Framework/SpecFlowExtensionUnitTests/Features/EmailFeature.feature.cs +++ /dev/null @@ -1,135 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] - public partial class EmailFeatureFeature - { - - private static TechTalk.SpecFlow.ITestRunner testRunner; - - private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "EmailFeature.feature" -#line hidden - - public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext - { - get - { - return this._testContext; - } - set - { - this._testContext = value; - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] - public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "EmailFeature", "\tEmail Tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] - public static void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] - public void TestInitialize() - { - if (((testRunner.FeatureContext != null) - && (testRunner.FeatureContext.FeatureInfo.Title != "EmailFeature"))) - { - global::SpecFlowExtUnitTests.Features.EmailFeatureFeature.FeatureSetup(null); - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BaseEmailTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "EmailFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Email")] - public void DriverInBaseEmailTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Email"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Driver in BaseEmailTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseEmailTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BaseEmailTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("TestObject is type EmailTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 9 - testRunner.And("BaseEmailTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 10 - testRunner.And("BaseEmailTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/PlaywrightFeature.feature.cs b/Framework/SpecFlowExtensionUnitTests/Features/PlaywrightFeature.feature.cs deleted file mode 100644 index 504d9d30e..000000000 --- a/Framework/SpecFlowExtensionUnitTests/Features/PlaywrightFeature.feature.cs +++ /dev/null @@ -1,138 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] - public partial class PlaywrightFeatureFeature - { - - private static TechTalk.SpecFlow.ITestRunner testRunner; - - private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "PlaywrightFeature.feature" -#line hidden - - public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext - { - get - { - return this._testContext; - } - set - { - this._testContext = value; - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] - public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "PlaywrightFeature", "\tPlaywright Tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] - public static void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] - public void TestInitialize() - { - if (((testRunner.FeatureContext != null) - && (testRunner.FeatureContext.FeatureInfo.Title != "PlaywrightFeature"))) - { - global::SpecFlowExtUnitTests.Features.PlaywrightFeatureFeature.FeatureSetup(null); - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BasePlaywrightTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "PlaywrightFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Playwright")] - public void DriverInBasePlaywrightTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Playwright"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Driver in BasePlaywrightTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BasePlaywrightTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BasePlaywrightTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("TestObject is type PlaywrightTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 9 - testRunner.And("BasePlaywrightTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 10 - testRunner.And("BasePlaywrightTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 11 - testRunner.And("BasePlaywrightTestSteps Null driver is null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/ScenarioContextFeature.feature.cs b/Framework/SpecFlowExtensionUnitTests/Features/ScenarioContextFeature.feature.cs deleted file mode 100644 index 86a7d069c..000000000 --- a/Framework/SpecFlowExtensionUnitTests/Features/ScenarioContextFeature.feature.cs +++ /dev/null @@ -1,261 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] - public partial class ScenarioContextFeatureFeature - { - - private static TechTalk.SpecFlow.ITestRunner testRunner; - - private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "ScenarioContextFeature.feature" -#line hidden - - public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext - { - get - { - return this._testContext; - } - set - { - this._testContext = value; - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] - public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "ScenarioContextFeature", "\tScenarioContext tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] - public static void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] - public void TestInitialize() - { - if (((testRunner.FeatureContext != null) - && (testRunner.FeatureContext.FeatureInfo.Title != "ScenarioContextFeature"))) - { - global::SpecFlowExtUnitTests.Features.ScenarioContextFeatureFeature.FeatureSetup(null); - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Context in BaseTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_General")] - public void ContextInBaseTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_General"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Context in BaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BaseTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Context in BaseSeleniumTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Selenium")] - public void ContextInBaseSeleniumTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Selenium"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Context in BaseSeleniumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 11 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 12 - testRunner.Given("class BaseSeleniumTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 13 - testRunner.Then("BaseSeleniumTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 14 - testRunner.And("BaseSeleniumTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Context in BaseWebServiceTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_WebService")] - public void ContextInBaseWebServiceTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_WebService"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Context in BaseWebServiceTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 17 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 18 - testRunner.Given("class BaseWebServiceTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 19 - testRunner.Then("BaseWebServiceTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 20 - testRunner.And("BaseWebServiceTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Context in BaseEmailTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Email")] - public void ContextInBaseEmailTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Email"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Context in BaseEmailTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 23 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 24 - testRunner.Given("class BaseEmailTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 25 - testRunner.Then("BaseEmailTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 26 - testRunner.And("BaseEmailTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Context in BaseDatabaseTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ScenarioContextFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Database")] - public void ContextInBaseDatabaseTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Database"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Context in BaseDatabaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 29 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 30 - testRunner.Given("class BaseDatabaseTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 31 - testRunner.Then("BaseDatabaseTestSteps ScenarioContext is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 32 - testRunner.And("BaseDatabaseTestSteps ScenarioContext is type ScenarioContext", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/SeleniumFeature.feature.cs b/Framework/SpecFlowExtensionUnitTests/Features/SeleniumFeature.feature.cs deleted file mode 100644 index 0474e0cf0..000000000 --- a/Framework/SpecFlowExtensionUnitTests/Features/SeleniumFeature.feature.cs +++ /dev/null @@ -1,129 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] - public partial class SeleniumFeatureFeature - { - - private static TechTalk.SpecFlow.ITestRunner testRunner; - - private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "SeleniumFeature.feature" -#line hidden - - public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext - { - get - { - return this._testContext; - } - set - { - this._testContext = value; - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] - public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "SeleniumFeature", "\tSelenium Tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] - public static void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] - public void TestInitialize() - { - if (((testRunner.FeatureContext != null) - && (testRunner.FeatureContext.FeatureInfo.Title != "SeleniumFeature"))) - { - global::SpecFlowExtUnitTests.Features.SeleniumFeatureFeature.FeatureSetup(null); - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BaseSeleniumTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "SeleniumFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Selenium")] - public void DriverInBaseSeleniumTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Selenium"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Driver in BaseSeleniumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseSeleniumTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BaseSeleniumTestSteps WebDriver is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("WebDriver is type EventFiringWebDriver", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/TestObjectFeature.feature.cs b/Framework/SpecFlowExtensionUnitTests/Features/TestObjectFeature.feature.cs deleted file mode 100644 index e8a48faec..000000000 --- a/Framework/SpecFlowExtensionUnitTests/Features/TestObjectFeature.feature.cs +++ /dev/null @@ -1,261 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] - public partial class TestObjectFeatureFeature - { - - private static TechTalk.SpecFlow.ITestRunner testRunner; - - private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "TestObjectFeature.feature" -#line hidden - - public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext - { - get - { - return this._testContext; - } - set - { - this._testContext = value; - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] - public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "TestObjectFeature", "\tTestObject is available", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] - public static void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] - public void TestInitialize() - { - if (((testRunner.FeatureContext != null) - && (testRunner.FeatureContext.FeatureInfo.Title != "TestObjectFeature"))) - { - global::SpecFlowExtUnitTests.Features.TestObjectFeatureFeature.FeatureSetup(null); - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject in BaseTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_General")] - public void TestObjectInBaseTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_General"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("TestObject in BaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BaseTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("TestObject is type BaseTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject in BaseSeleniumTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Selenium")] - public void TestObjectInBaseSeleniumTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Selenium"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("TestObject in BaseSeleniumTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 11 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 12 - testRunner.Given("class BaseSeleniumTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 13 - testRunner.Then("BaseSeleniumTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 14 - testRunner.And("TestObject is type SeleniumTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject in BaseWebServiceTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_WebService")] - public void TestObjectInBaseWebServiceTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_WebService"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("TestObject in BaseWebServiceTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 17 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 18 - testRunner.Given("class BaseWebServiceTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 19 - testRunner.Then("BaseWebServiceTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 20 - testRunner.And("TestObject is type WebServiceTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject in BaseEmailTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Email")] - public void TestObjectInBaseEmailTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Email"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("TestObject in BaseEmailTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 23 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 24 - testRunner.Given("class BaseEmailTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 25 - testRunner.Then("BaseEmailTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 26 - testRunner.And("TestObject is type EmailTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("TestObject in BaseDatabaseTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "TestObjectFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_Database")] - public void TestObjectInBaseDatabaseTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_Database"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("TestObject in BaseDatabaseTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 29 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 30 - testRunner.Given("class BaseDatabaseTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 31 - testRunner.Then("BaseDatabaseTestSteps TestObject is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 32 - testRunner.And("TestObject is type DatabaseTestObject", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/SpecFlowExtensionUnitTests/Features/WebServiceFeature.feature.cs b/Framework/SpecFlowExtensionUnitTests/Features/WebServiceFeature.feature.cs deleted file mode 100644 index 499058cf4..000000000 --- a/Framework/SpecFlowExtensionUnitTests/Features/WebServiceFeature.feature.cs +++ /dev/null @@ -1,129 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace SpecFlowExtUnitTests.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] - public partial class WebServiceFeatureFeature - { - - private static TechTalk.SpecFlow.ITestRunner testRunner; - - private Microsoft.VisualStudio.TestTools.UnitTesting.TestContext _testContext; - - private static string[] featureTags = ((string[])(null)); - -#line 1 "WebServiceFeature.feature" -#line hidden - - public virtual Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext - { - get - { - return this._testContext; - } - set - { - this._testContext = value; - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] - public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "WebServiceFeature", "\tWeb Service Tests", ProgrammingLanguage.CSharp, featureTags); - testRunner.OnFeatureStart(featureInfo); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] - public static void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] - public void TestInitialize() - { - if (((testRunner.FeatureContext != null) - && (testRunner.FeatureContext.FeatureInfo.Title != "WebServiceFeature"))) - { - global::SpecFlowExtUnitTests.Features.WebServiceFeatureFeature.FeatureSetup(null); - } - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] - public void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testContext); - } - - public void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Driver in BaseWebServiceTestSteps")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "WebServiceFeature")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("MAQS_WebService")] - public void DriverInBaseWebServiceTestSteps() - { - string[] tagsOfScenario = new string[] { - "MAQS_WebService"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Driver in BaseWebServiceTestSteps", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 5 -this.ScenarioInitialize(scenarioInfo); -#line hidden - if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 6 - testRunner.Given("class BaseWebServiceTestSteps", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 7 - testRunner.Then("BaseWebServiceTestSteps WebServiceDriver is not null", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden -#line 8 - testRunner.And("BaseWebServiceTestSteps WebServiceDriver is type EventFiringWebServiceDriver", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/Framework/Utilities/Utilities.csproj b/Framework/Utilities/Utilities.csproj index 006e32934..0d96a1f0b 100644 --- a/Framework/Utilities/Utilities.csproj +++ b/Framework/Utilities/Utilities.csproj @@ -43,18 +43,17 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + - + diff --git a/Framework/UtilitiesUnitTests/App.config b/Framework/UtilitiesUnitTests/App.config index 4eefa46ad..4e724f116 100644 --- a/Framework/UtilitiesUnitTests/App.config +++ b/Framework/UtilitiesUnitTests/App.config @@ -36,7 +36,7 @@ --> - +