dotnet add package StructuralAnalysisFormat.Tests.Infrastructure --version 1.7.1
NuGet\Install-Package StructuralAnalysisFormat.Tests.Infrastructure -Version 1.7.1
<PackageReference Include="StructuralAnalysisFormat.Tests.Infrastructure" Version="1.7.1" />
paket add StructuralAnalysisFormat.Tests.Infrastructure --version 1.7.1
#r "nuget: StructuralAnalysisFormat.Tests.Infrastructure, 1.7.1"
// Install StructuralAnalysisFormat.Tests.Infrastructure as a Cake Addin #addin nuget:?package=StructuralAnalysisFormat.Tests.Infrastructure&version=1.7.1 // Install StructuralAnalysisFormat.Tests.Infrastructure as a Cake Tool #tool nuget:?package=StructuralAnalysisFormat.Tests.Infrastructure&version=1.7.1
This package adds some functionality that may come in handy for testing purposes.
One of the features are what we call data builders These are fluent-api classes that allow you to quickly construct data objects that by default pass validation. They also have the benefit that if a property would be renamed on an object, the data builder will be adjusted but the API of the builder remains the same. Which means you won't have to make any changes to your test code!
Good to know - Metric & Imperial
Any values unit wise that are set using doubles, will always be metric as this is how the data builders are set up. If the builder accepts actual units, you are free to provide it with units defined in the imperial system for example.
Good to know - Sane values
While we do our best to make sure that the model actually makes sense in the context of structural engineering, this may sometimes not be the case.
So it may happen that some objects constructed by either the data builders or from the house model have weird values that do not make sense to a structural engineer.
The API is the same for each builder available.
In general (replace <NameOfDataObject> with the name of object):
- The builders all end with *Builder in their name
<NameOfDataObject>Builder.Create();will quickly create an object using either pre-defined or random values that are considered valid in terms of validation
<NameOfDataObject>Builder.Setup();allows you to enter "configuration" mode for the builder
<NameOfDataObject>Builder.Setup() ... .Build();will construct the object for you using the configured settings you have defined in the
using SAF.Infrastructure.Tests.DataBuilders.StructuralElements; using SAF.DataAccess.Models.StructuralElements; // Create a node with zero value coordinates (X,Y,Z) ExcelStructuralPointConnection node = ExcelStructuralPointConnectionBuilder.Create(); // Create a node with coordinate values, X = 2 meters, Y = 5.5 meters and Z = 7 meters ExcelStructuralPointConnection node2 = ExcelStructuralPointConnectionBuilder .Setup() .WithCoordinates(2D, 5.5D, 7D) .Build();
Another feature is that we have included a full-blown house model.
The goal of this model is to include every supported object from the SDK.
You can get this model by executing the following lines of code:
using SAF.Infrastructure.Tests.Models; using SAF.DataAccess.Models; House house = new House(); ExcelModel houseAsModel = house.Construct();
|Product||Versions Compatible and additional computed target framework versions.|
|.NET||net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed.|
|.NET Core||netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed.|
|.NET Standard||netstandard2.0 is compatible. netstandard2.1 was computed.|
|.NET Framework||net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed.|
|MonoAndroid||monoandroid was computed.|
|MonoMac||monomac was computed.|
|MonoTouch||monotouch was computed.|
|Tizen||tizen40 was computed. tizen60 was computed.|
|Xamarin.iOS||xamarinios was computed.|
|Xamarin.Mac||xamarinmac was computed.|
|Xamarin.TVOS||xamarintvos was computed.|
|Xamarin.WatchOS||xamarinwatchos was computed.|
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.