Update NuGet packages and refactor test lifecycle#6
Open
HowardvanRooijen wants to merge 15 commits intomainfrom
Open
Update NuGet packages and refactor test lifecycle#6HowardvanRooijen wants to merge 15 commits intomainfrom
HowardvanRooijen wants to merge 15 commits intomainfrom
Conversation
Updated several NuGet packages in `Ais.Net.Models.Specs.csproj` to their latest versions, including `coverlet.msbuild`, `Microsoft.NET.Test.Sdk`, `NUnit3TestAdapter`, `Reqnroll.NUnit`, and `Shouldly`. Added `[NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)]` to `AisMessageType18Feature` for improved test fixture management. Refactored `FeatureSetupAsync` and `FeatureTearDownAsync` methods to be static, enhancing test setup practices. Enhanced `TestInitializeAsync`, `ScenarioStartAsync`, and `ScenarioCleanupAsync` methods for better error handling and resource management. Updated `packages.lock.json` to reflect new package versions and modified `Ais.Net.Models.csproj` to upgrade `Endjin.RecommendedPractices.GitHub` from `2.1.13` to `2.1.18`.
Test Results8 tests +7 8 ✅ +7 0s ⏱️ ±0s Results for commit 0270c1b. ± Comparison against base commit cd6afc3. This pull request removes 1 and adds 8 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Updated `Ais.Net.Models.Specs.csproj` to include new compile and feature item groups for `.feature.cs` and `.feature` files. Introduced nullable types and null checks in `AisMessageType18StepDefinitions.cs` for better data integrity. Added new step definition classes for `AisMessageType19`, `AisMessageType1Through3`, `AisMessageType24Part0`, `AisMessageType24Part1`, `AisMessageType27`, and `AisMessageType5`, each with methods for creating records and validating properties. Corresponding feature files were auto-generated to define scenarios for testing the new message types.
This commit refactors several AIS message type step definition classes to inherit from a new base class `StepDefinitionBase`, introducing a common `Message` property for better management of created AIS messages. The `PositionData` class is updated to use `double` for `Latitude` and `Longitude` for improved precision. A new `CommonStepDefinitions` class is added for shared background steps, and feature files are renamed for clarity, utilizing parameterized examples. Additionally, a `Hooks` class is introduced to handle pre- and post-scenario logic, enhancing the overall structure and maintainability of the tests.
Removed `<None>` elements for settings files and eliminated `<Compile>` and `<ReqnrollFeature>` elements related to feature files. This simplifies the project structure and may streamline the build process.
Code Coverage Summary Report - Linux (No TFM)Summary
CoverageAis.Net.Models - 35.5%
|
Code Coverage Summary Report - Windows (No TFM)Summary
CoverageAis.Net.Models - 35.5%
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated several NuGet packages in
Ais.Net.Models.Specs.csprojto their latest versions, includingcoverlet.msbuild,Microsoft.NET.Test.Sdk,NUnit3TestAdapter,Reqnroll.NUnit, andShouldly.Added
[NUnit.Framework.FixtureLifeCycleAttribute(NUnit.Framework.LifeCycle.InstancePerTestCase)]toAisMessageType18Featurefor improved test fixture management. RefactoredFeatureSetupAsyncandFeatureTearDownAsyncmethods to be static, enhancing test setup practices.Enhanced
TestInitializeAsync,ScenarioStartAsync, andScenarioCleanupAsyncmethods for better error handling and resource management. Updatedpackages.lock.jsonto reflect new package versions and modifiedAis.Net.Models.csprojto upgradeEndjin.RecommendedPractices.GitHubfrom2.1.13to2.1.18.