TipsTrade.ApiClient.Testing
8.0.0
dotnet add package TipsTrade.ApiClient.Testing --version 8.0.0
NuGet\Install-Package TipsTrade.ApiClient.Testing -Version 8.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TipsTrade.ApiClient.Testing" Version="8.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TipsTrade.ApiClient.Testing" Version="8.0.0" />
<PackageReference Include="TipsTrade.ApiClient.Testing" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TipsTrade.ApiClient.Testing --version 8.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: TipsTrade.ApiClient.Testing, 8.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TipsTrade.ApiClient.Testing@8.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TipsTrade.ApiClient.Testing&version=8.0.0
#tool nuget:?package=TipsTrade.ApiClient.Testing&version=8.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
TipsTrade.ApiClient.Testing 
Utilities to help unit tests validate JSON attribute usage and other small testing concerns.
Versioning
- As of version 8.x the package major version follows the .NET target version (e.g.
8.x.xtargetsnet8.0).
Supported target framework
net8.0
Intended use
- Project supplies lightweight test helpers (designed to be referenced from unit test projects) that integrate with NUnit's
TestCaseDatato produce parameterized tests.
Namespaces and important types
TipsTrade.ApiClient.Testing
JsonAttributeAssert� static test helper focused on JSON attribute consistency across serializers:- Test-case generation:
GetTestCases(this Assembly assembly, Func<Type, bool>? typePredicate = null, Func<PropertyInfo, bool>? propertyPredicate = null)� enumerate properties from an assembly that have JSON attributes and returnIEnumerable<TestCaseData<PropertyInfo>>.GetTestCases<T>(Func<PropertyInfo, bool>? predicate = null)� properties for a specific type.GetTestCases(this Type type, Func<PropertyInfo, bool>? predicate = null)� properties for a givenType.GetTestCases(this IEnumerable<PropertyInfo> properties)� buildTestCaseDatafor an enumerable of properties.
- Assertions:
IsConsistent(PropertyInfo property)� asserts both ignore and name attributes are consistent.IsNameConsistent(PropertyInfo property)� assertsNewtonsoft.Json.JsonPropertyandSystem.Text.Json.Serialization.JsonPropertyName(if present) have the same name.IsIgnoreConsistent(PropertyInfo property)� assertsJsonIgnoreattributes are present/absent consistently between Newtonsoft and System.Text.Json.
- Test-case generation:
Behavior details
- The helper looks for both
Newtonsoft.JsonandSystem.Text.Jsonattributes and yields NUnitTestCaseDatanamed using the declaring type and property name. - Designed to be used from NUnit tests via
TestCaseSourceor by iterating the test cases returned from an assembly/type.
Notes
- This README was updated to reflect the actual public surface found in source (
JsonAttributeAssert) and the project's target framework (net8.0). - For examples, see the repository's
Testsproject which consumes these helpers to validate JSON attribute consistency across models.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Newtonsoft.Json (>= 13.0.4)
- NUnit (>= 4.6.1)
- System.Text.Json (>= 8.0.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.