Build and test the library
Build
# Build the entire solution
dotnet build Virtufin.slnx
# Build in Release mode
dotnet build Virtufin.slnx -c Release
# Build a single project
dotnet build src/Virtufin.Core/Virtufin.Core.csproj
Test
# Run all tests
dotnet test Virtufin.slnx
# Run a single test project
dotnet test tests/Virtufin.Core.Test/Virtufin.Core.Test.csproj
dotnet test tests/Virtufin.Data.Test/Virtufin.Data.Test.csproj
# Run a single test by fully-qualified name
dotnet test tests/Virtufin.Core.Test/Virtufin.Core.Test.csproj \
--filter "FullyQualifiedName=Virtufin.Core.Test.RegistryTest.TestValues"
# Run tests matching a display name pattern
dotnet test Virtufin.slnx --filter "DisplayName~Registry"
# With code coverage (Cobertura format)
dotnet test Virtufin.slnx --collect:"XPlat Code Coverage"
Test framework: xUnit 2.9.3 with FluentAssertions 8.8.0. Always use FluentAssertions style:
value.Should().Be(expected);
result.Should().BeNull();
list.Should().BeEquivalentTo(expected);
Regenerate FlatBuffers code
The build generates the FlatBuffers code itself: see FlatBuffers.
Regenerate proto stubs
If the C# protobuf stubs in src/Virtufin.Data/Protos/Generated/ (or similar) are stale, run buf generate (per repo convention).
Conventions
See Conventions for the project file conventions and C# style guide.
See also
- Architecture — project structure and dependency direction
- FlatBuffers — schema and codegen
- Core EAV — for examples of the EAV types