🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

Qowaiv.TestTools

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Qowaiv.TestTools

Qowaiv is a (Single) Value Object library. It aims to model reusable (Single) Value Objects that can be used in a wide variety of modeling scenarios, both inside and outside a Domain-driven context.

8.0.0
NuGet
Version published
Maintainers
1
Created
Source

Qowaiv.TestTools

Domain-driven design bottom up

Qowaiv is a (Single) Value Object library. It aims to model reusable, immutable, (Single) Value Objects that can be used a wide variety of modeling scenarios, both inside and outside a Domain-driven context.

Package

This package contains helpers to make writing unit tests for SVO's easier.

IO

Temporary directory

Testing IO can be cumbersome. The TemporaryDirectory can help by creating a directory that only exists for the duration of a test:

using (var directory = new TemporaryDirectory()
{
     var file = directory.CraeteFile("somefile.txt");
     // ..
}

On the dispose, the directory, and all it children will be deleted.

File lock

To test IO related unhappy flows, it can be useful to create a temporary lock on a file. This can be done as follows:


var file = new FileInfo("somefile.txt");

using (var @lock = file.Lock())
{
     file.OpenRead(); // Throws IOException.
}

Further reading

More info can be found at https://github.com/Qowaiv/Qowaiv.

Keywords

DDD

FAQs

Package last updated on 26 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts