diff --git a/run_coverage.sh b/run_coverage.sh new file mode 100644 index 0000000..f00384e --- /dev/null +++ b/run_coverage.sh @@ -0,0 +1,8 @@ +set -e +cd "$(dirname "$0")" + +rm -rf coverage +dotnet test -p:CollectCoverage=true -p:CoverletOutput="../../../coverage/" -p:MergeWith="../../../coverage/coverage.json" -p:CoverletOutputFormat=\"json,opencover\" -p:ExcludeByAttribute="GeneratedCode" -maxcpucount:1 src +reportgenerator -reports:coverage/coverage.opencover.xml -targetdir:coverage/report + +# see result in coverage/report/index.html diff --git a/src/tests/Tochka.JsonRpc.OpenRpc.Tests/Services/OpenRpcDocumentGeneratorTests.cs b/src/tests/Tochka.JsonRpc.OpenRpc.Tests/Services/OpenRpcDocumentGeneratorTests.cs index 55b45eb..19718ce 100644 --- a/src/tests/Tochka.JsonRpc.OpenRpc.Tests/Services/OpenRpcDocumentGeneratorTests.cs +++ b/src/tests/Tochka.JsonRpc.OpenRpc.Tests/Services/OpenRpcDocumentGeneratorTests.cs @@ -922,7 +922,7 @@ public void CombineBindingStyles_BothObjectAndArray_ReturnEither() { new JsonRpcControllerAttribute() }, - ControllerName = controllerName, + ControllerName = controllerName!, MethodInfo = action?.Method ?? ((Action) ValidMethod).Method }, Properties =