diff --git a/CHANGELOG.md b/CHANGELOG.md
index a6116066..77dcb54a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ but this project DOES NOT adhere to [Semantic Versioning](http://semver.org/).
* Remove LeanCode.IdentityServer.KeyVault
* Remove LeanCode.ExternalIdentityProviders
* Remove LeanCode.PdfRocket
+* Remove StyleCop completely
## 8.1
diff --git a/README.md b/README.md
index 2089eceb..cfaa7a40 100644
--- a/README.md
+++ b/README.md
@@ -80,10 +80,10 @@ If you want to build release configuration of the library, you need to specify w
### Testing
-The framework can be unit-tested by `cd`ing into `test` folder and calling
+The framework can be unit-tested by running the following command in the root of the repository:
```sh
-dotnet msbuild /t:RunTests
+dotnet test
```
Moreover, there are some integration-style tests that require external services. They can be tested with `docker` and `docker-compose` tools. Currently there is one integration-test suite:
@@ -93,7 +93,10 @@ Moreover, there are some integration-style tests that require external services.
It has a `docker` folder that contains necessary configuration. You can run the suite using:
```sh
-docker-compose run test
+# For running tests with SQL Server
+$ DB=sqlserver docker-compose run test
+# For running tests with PostgreSQL
+$ DB=postgres docker-compose run test
```
### Publishing
@@ -120,8 +123,7 @@ The project is divided into the main directories:
1. `src` with the source code,
2. `test` with test,
- 3. `benchmarks` with benchmarking project,
- 4. `docs` with this documentation.
+ 3. `docs` with this documentation.
Plus there are some files in the root directory (SLN, config files & READMEs).
@@ -142,7 +144,7 @@ The `src` folder that contains the main source code is then divided into:
CoreLib build system mostly MSBuild-based, with some help of CI system to orchestrate build/test/publish process (see [Building & Testing](./building_and_testing.md) for more details).
-We leverage .NET Core's MSBuild `Directory.Build.targets` files to centrally manage dependency versions. It is forbidden to directly specify `Version` in `csproj`s. Instead, one adds simple `` and then `` in `Directory.Build.targets` in the CoreLib root. This immensely helps avoiding dependency conflicts down the road.
+We leverage [Central Package Management]'s `Directory.Packages.props` files to centrally manage dependency versions. It is forbidden to directly specify `Version` in `csproj`s.
Besides `.targets` file, we use central `Directory.Build.props` to manage some of the project properties. Check [/Directory.Build.props], [/src/Directory.Build.props] and [/test/Directory.Build.props] what is being centrally set.
@@ -160,7 +162,7 @@ Or you can just modify the following project template (most of the projects use
```
-
+[Central Package Management]: https://learn.microsoft.com/en-us/nuget/consume-packages/central-package-management
[/Directory.Build.props]: https://github.com/leancodepl/corelibrary/blob/HEAD/Directory.Build.props
[/src/Directory.Build.props]: https://github.com/leancodepl/corelibrary/blob/HEAD/src/Directory.Build.props
[/test/Directory.Build.props]: https://github.com/leancodepl/corelibrary/blob/HEAD/test/Directory.Build.props
diff --git a/docs/tests/integration_tests/index.md b/docs/tests/integration_tests/index.md
index 34a35645..d8d77524 100644
--- a/docs/tests/integration_tests/index.md
+++ b/docs/tests/integration_tests/index.md
@@ -63,6 +63,10 @@ public class ExampleAppTestApp : LeanCodeTestFactory
{
base.ConfigureWebHost(builder);
+ // Remember to set correct content root path. This is the easiest option.
+ builder.UseSolutionRelativeContentRoot(
+ "tests/ExampleApp.IntegrationTests/ExampleApp.IntegrationTests.csproj");
+
builder.ConfigureServices(services =>
{
// Incorporate a hosted service responsible for creating
@@ -78,19 +82,6 @@ public class ExampleAppTestApp : LeanCodeTestFactory
}
```
-Following `ItemGroup` must be added to the integration test project's `.csproj` file. This group facilitates the discovery of the content root for the web application being tested.
-
-```xml
-
-
-
-```
-
## Authentication handler
The `TestAuthenticationHandler` manages user authentication and deserialization of `ClaimsPrincipal` objects for testing purposes.
@@ -185,7 +176,7 @@ public class AuthenticatedExampleAppTestApp : ExampleAppTestApp
public AuthenticatedExampleAppTestApp() { }
- public override async Task InitializeAsync()
+ public override async ValueTask InitializeAsync()
{
AuthenticateAsTestSuperUser();
@@ -241,7 +232,7 @@ public class UnauthenticatedExampleAppTestApp : ExampleAppTestApp
public HttpCommandsExecutor Command { get; private set; } = default!;
public HttpOperationsExecutor Operation { get; private set; } = default!;
- public override async Task InitializeAsync()
+ public override async ValueTask InitializeAsync()
{
await base.InitializeAsync();
@@ -294,9 +285,9 @@ public class Tests : IAsyncLifetime
Assert.Matches("^project_[0-7][0-9A-HJKMNP-TV-Z]{25}$", project.Id);
}
- public Task InitializeAsync() => app.InitializeAsync();
+ public ValueTask InitializeAsync() => app.InitializeAsync();
- public Task DisposeAsync() => app.DisposeAsync().AsTask();
+ public ValueTask DisposeAsync() => app.DisposeAsync();
}
public static class ApiClientHelpers