Skip to content

feat: Replace Newtonsoft.Json with System.Text.Json #89

feat: Replace Newtonsoft.Json with System.Text.Json

feat: Replace Newtonsoft.Json with System.Text.Json #89

GitHub Actions / DotNET - Tests succeeded Jan 24, 2024 in 0s

161 passed, 0 failed and 0 skipped

Tests passed successfully

Report Passed Failed Skipped Time
tests/Serilog.Ui.ElasticSearchProvider.Tests/TestResults/test-results.trx 16✔️ 46s
tests/Serilog.Ui.MongoDbProvider.Tests/TestResults/test-results.trx 18✔️ 10s
tests/Serilog.Ui.MsSqlServerProvider.Tests/TestResults/test-results.trx 31✔️ 38s
tests/Serilog.Ui.MySqlProvider.Tests/TestResults/test-results.trx 16✔️ 42s
tests/Serilog.Ui.PostgreSqlProvider.Tests/TestResults/test-results.trx 31✔️ 29s
tests/Serilog.Ui.Web.Tests/TestResults/test-results.trx 49✔️ 8s

✔️ tests/Serilog.Ui.ElasticSearchProvider.Tests/TestResults/test-results.trx

16 tests were completed in 46s with 16 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
ElasticSearch.Tests.DataProvider.DataProviderBaseTest 2✔️ 169ms
ElasticSearch.Tests.DataProvider.DataProviderPaginationTest 4✔️ 265ms
ElasticSearch.Tests.DataProvider.DataProviderSearchTest 8✔️ 175ms
ElasticSearch.Tests.Extensions.SerilogUiOptionBuilderExtensionsTest 2✔️ 33ms

✔️ ElasticSearch.Tests.DataProvider.DataProviderBaseTest

✔️ It_logs_and_throws_when_db_read_breaks_down
✔️ It_throws_when_any_dependency_is_null

✔️ ElasticSearch.Tests.DataProvider.DataProviderPaginationTest

✔️ It fetches with limit
✔️ It fetches with limit and skip
✔️ It fetches with skip
✔️ It_throws_when_skip_is_zero

✔️ ElasticSearch.Tests.DataProvider.DataProviderSearchTest

✔️ It finds all data with default search
✔️ It finds data with all filters
✔️ It finds only data emitted after date
✔️ It finds only data emitted before date
✔️ It finds only data with specific level
✔️ It finds only data with specific message content
✔️ It finds same data on same repeated search
✔️ It_finds_only_data_emitted_in_dates_range

✔️ ElasticSearch.Tests.Extensions.SerilogUiOptionBuilderExtensionsTest

✔️ It_registers_provider_and_dependencies
✔️ It_throws_on_invalid_registration

✔️ tests/Serilog.Ui.MongoDbProvider.Tests/TestResults/test-results.trx

18 tests were completed in 10s with 18 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
MongoDb.Tests.DataProvider.DataProviderBaseTest 2✔️ 937ms
MongoDb.Tests.DataProvider.DataProviderPaginationTest 4✔️ 480ms
MongoDb.Tests.DataProvider.DataProviderSearchTest 8✔️ 320ms
MongoDb.Tests.Extensions.SerilogUiOptionBuilderExtensionsTest 4✔️ 948ms

✔️ MongoDb.Tests.DataProvider.DataProviderBaseTest

✔️ It logs and throws when db read breaks down
✔️ It throws when any dependency is null

✔️ MongoDb.Tests.DataProvider.DataProviderPaginationTest

✔️ It fetches with limit
✔️ It fetches with limit and skip
✔️ It fetches with skip
✔️ It throws when skip is zero

✔️ MongoDb.Tests.DataProvider.DataProviderSearchTest

✔️ It finds all data with default search
✔️ It finds data with all filters
✔️ It finds only data emitted after date
✔️ It finds only data emitted before date
✔️ It finds only data emitted in dates range
✔️ It finds only data with specific level
✔️ It finds only data with specific message content
✔️ It finds same data on same repeated search

✔️ MongoDb.Tests.Extensions.SerilogUiOptionBuilderExtensionsTest

✔️ It registers IMongoClient only when not registered
✔️ It registers provider and dependencies with connstring and collection
✔️ It registers provider and dependencies with connstring collection and dbname
✔️ It throws on invalid registration

✔️ tests/Serilog.Ui.MsSqlServerProvider.Tests/TestResults/test-results.trx

31 tests were completed in 38s with 31 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
MsSql.Tests.DapperHandlers.DapperDateTimeHandlerTest 14✔️ 322ms
MsSql.Tests.DataProvider.DataProviderBaseTest 2✔️ 235ms
MsSql.Tests.DataProvider.DataProviderPaginationTest 4✔️ 107ms
MsSql.Tests.DataProvider.DataProviderSearchTest 8✔️ 137ms
MsSql.Tests.Extensions.SerilogUiOptionBuilderExtensionsTest 3✔️ 303ms

✔️ MsSql.Tests.DapperHandlers.DapperDateTimeHandlerTest

✔️ It fail parse with current culture when original format culture was different
✔️ It parse exact formats with none style and invariant culture(customFormat: "M/d/yyyy h:mm:ss tt zzz")
✔️ It parse exact formats with none style and invariant culture(customFormat: "M/d/yyyy h:mm:ss tt")
✔️ It parse exact formats with none style and invariant culture(customFormat: "M/dd/yyyy h:mm:ss tt zzz")
✔️ It parse exact formats with none style and invariant culture(customFormat: "M/dd/yyyy h:mm:ss tt")
✔️ It parse exact formats with none style and invariant culture(customFormat: "M/dd/yyyy hh:mm:ss tt")
✔️ It parse exact formats with none style and invariant culture(customFormat: "M/dd/yyyy hh:mm:ss")
✔️ It parse exact formats with none style and invariant culture(customFormat: "MM/d/yyyy hh:mm:ss tt")
✔️ It parse exact formats with none style and invariant culture(customFormat: "MM/dd/yyyy hh:mm:ss tt")
✔️ It parse exact formats with none style and invariant culture(customFormat: "MM/dd/yyyy HH:mm:ss")
✔️ It parse simple datetime with local style and current culture
✔️ It parse strange format using custom delegate
✔️ It sets value without changes
✔️ It throws when using custom delegate not returns datetime with utc kind

✔️ MsSql.Tests.DataProvider.DataProviderBaseTest

✔️ It logs and throws when db read breaks down
✔️ It throws when any dependency is null

✔️ MsSql.Tests.DataProvider.DataProviderPaginationTest

✔️ It fetches with limit
✔️ It fetches with limit and skip
✔️ It fetches with skip
✔️ It throws when skip is zero

✔️ MsSql.Tests.DataProvider.DataProviderSearchTest

✔️ It finds all data with default search
✔️ It finds data with all filters
✔️ It finds only data emitted after date
✔️ It finds only data emitted before date
✔️ It finds only data emitted in dates range
✔️ It finds only data with specific level
✔️ It finds only data with specific message content
✔️ It finds same data on same repeated search

✔️ MsSql.Tests.Extensions.SerilogUiOptionBuilderExtensionsTest

✔️ It registers provider and dependencies(schemaName: "schema")
✔️ It registers provider and dependencies(schemaName: null)
✔️ It throws on invalid registration

✔️ tests/Serilog.Ui.MySqlProvider.Tests/TestResults/test-results.trx

16 tests were completed in 42s with 16 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
MySql.Tests.DataProvider.DataProviderBaseTest 2✔️ 286ms
MySql.Tests.DataProvider.DataProviderPaginationTest 4✔️ 102ms
MySql.Tests.DataProvider.DataProviderSearchTest 8✔️ 108ms
MySql.Tests.Extensions.SerilogUiOptionBuilderExtensionsTest 2✔️ 284ms

✔️ MySql.Tests.DataProvider.DataProviderBaseTest

✔️ It logs and throws when db read breaks down
✔️ It throws when any dependency is null

✔️ MySql.Tests.DataProvider.DataProviderPaginationTest

✔️ It fetches with limit
✔️ It fetches with limit and skip
✔️ It fetches with skip
✔️ It throws when skip is zero

✔️ MySql.Tests.DataProvider.DataProviderSearchTest

✔️ It finds all data with default search
✔️ It finds data with all filters
✔️ It finds only data emitted after date
✔️ It finds only data emitted before date
✔️ It finds only data emitted in dates range
✔️ It finds only data with specific level
✔️ It finds only data with specific message content
✔️ It finds same data on same repeated search

✔️ MySql.Tests.Extensions.SerilogUiOptionBuilderExtensionsTest

✔️ It registers provider and dependencies
✔️ It throws on invalid registration

✔️ tests/Serilog.Ui.PostgreSqlProvider.Tests/TestResults/test-results.trx

31 tests were completed in 29s with 31 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Postgres.Tests.DataProvider.DataProviderBaseTest 2✔️ 360ms
Postgres.Tests.DataProvider.DataProviderPaginationTest 4✔️ 117ms
Postgres.Tests.DataProvider.DataProviderSearchTest 8✔️ 141ms
Postgres.Tests.Extensions.SerilogUiOptionBuilderExtensionsTest 3✔️ 346ms
Postgres.Tests.Model.LogLevelConverterTest 14✔️ 71ms

✔️ Postgres.Tests.DataProvider.DataProviderBaseTest

✔️ It logs and throws when db read breaks down
✔️ It throws when any dependency is null

✔️ Postgres.Tests.DataProvider.DataProviderPaginationTest

✔️ It fetches with limit
✔️ It fetches with limit and skip
✔️ It fetches with skip
✔️ It throws when skip is zero

✔️ Postgres.Tests.DataProvider.DataProviderSearchTest

✔️ It finds all data with default search
✔️ It finds data with all filters
✔️ It finds only data emitted after date
✔️ It finds only data emitted before date
✔️ It finds only data emitted in dates range
✔️ It finds only data with specific level
✔️ It finds only data with specific message content
✔️ It finds same data on same repeated search

✔️ Postgres.Tests.Extensions.SerilogUiOptionBuilderExtensionsTest

✔️ It registers provider and dependencies(schemaName: "schema")
✔️ It registers provider and dependencies(schemaName: null)
✔️ It throws on invalid registration

✔️ Postgres.Tests.Model.LogLevelConverterTest

✔️ It maps the correct log level name(input: "0", expected: "Verbose")
✔️ It maps the correct log level name(input: "1", expected: "Debug")
✔️ It maps the correct log level name(input: "2", expected: "Information")
✔️ It maps the correct log level name(input: "3", expected: "Warning")
✔️ It maps the correct log level name(input: "4", expected: "Error")
✔️ It maps the correct log level name(input: "5", expected: "Fatal")
✔️ It maps the correct log level name(input: "random", expected: "")
✔️ It maps the correct log level value(input: "Debug", expected: 1)
✔️ It maps the correct log level value(input: "Error", expected: 4)
✔️ It maps the correct log level value(input: "Fatal", expected: 5)
✔️ It maps the correct log level value(input: "Information", expected: 2)
✔️ It maps the correct log level value(input: "random", expected: 100)
✔️ It maps the correct log level value(input: "Verbose", expected: 0)
✔️ It maps the correct log level value(input: "Warning", expected: 3)

✔️ tests/Serilog.Ui.Web.Tests/TestResults/test-results.trx

49 tests were completed in 8s with 49 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Serilog.Ui.Web.Authorization.Tests.BasicAuthenticationFilterTests 3✔️ 57ms
Serilog.Ui.Web.Tests.Authorization.AuthorizationAsyncTest 1✔️ 583ms
Serilog.Ui.Web.Tests.Authorization.AuthorizationDefaultTest 1✔️ 534ms
Serilog.Ui.Web.Tests.Authorization.AuthorizationSyncTest 1✔️ 2s
Ui.Web.Tests.Endpoints.SerilogUiAppRoutesTest 4✔️ 156ms
Ui.Web.Tests.Endpoints.SerilogUiDecoratorsTest 4✔️ 161ms
Ui.Web.Tests.Endpoints.SerilogUiEndpointsTest 4✔️ 1s
Ui.Web.Tests.Extensions.ApplicationBuilderExtensionsTest 3✔️ 276ms
Ui.Web.Tests.Extensions.ContentInjectionTest 7✔️ 92ms
Ui.Web.Tests.Extensions.HttpRequestExtensionsTest 5✔️ 868ms
Ui.Web.Tests.SerilogUiMiddlewareTest 16✔️ 2s

✔️ Serilog.Ui.Web.Authorization.Tests.BasicAuthenticationFilterTests

✔️ Authorize WithInvalidCredentials ShouldReturnFalse
✔️ Authorize WithMissingAuthorizationHeader ShouldSetChallengeResponse
✔️ Authorize WithValidCredentials ShouldReturnTrue

✔️ Serilog.Ui.Web.Tests.Authorization.AuthorizationAsyncTest

✔️ Local Requests Are Not Allowed By Async Filters

✔️ Serilog.Ui.Web.Tests.Authorization.AuthorizationDefaultTest

✔️ Local Requests Are Allowed By Default

✔️ Serilog.Ui.Web.Tests.Authorization.AuthorizationSyncTest

✔️ Local Requests Are Not Allowed By Sync Filters

✔️ Ui.Web.Tests.Endpoints.SerilogUiAppRoutesTest

✔️ It gets app home
✔️ It redirects app home
✔️ It returns page error when stream cannot load app home
✔️ It throws on app home if ui options were not set

✔️ Ui.Web.Tests.Endpoints.SerilogUiDecoratorsTest

✔️ It blocks the call on failed authentication
✔️ It blocks the GetHome on failed authentication with custom delegate
✔️ It forwards the call to app endpoints on success authentication
✔️ It forwards the call to app routes when unauth page access is enabled

✔️ Ui.Web.Tests.Endpoints.SerilogUiEndpointsTest

✔️ It gets logs
✔️ It gets logs keys
✔️ It gets logs with search parameters
✔️ It serializes an error on exception

✔️ Ui.Web.Tests.Extensions.ApplicationBuilderExtensionsTest

✔️ It not throws on null parameters
✔️ It register ui middleware
✔️ It throws on null deps

✔️ Ui.Web.Tests.Extensions.ContentInjectionTest

✔️ It appends multiple script tags
✔️ It appends multiple stylesheet tags
✔️ It appends script tag with customs
✔️ It appends script tag with defaults
✔️ It appends stylesheet tag with customs
✔️ It appends stylesheet tag with defaults
✔️ It mix scripts and stylesheets

✔️ Ui.Web.Tests.Extensions.HttpRequestExtensionsTest

✔️ It is local when no xforwarded and remote ip address is null
✔️ It is local when remote ip address equals local ip address
✔️ It is local when remote ip address is loopback
✔️ It is not local when remote ip address is not local nor loopback
✔️ It is not local when xforwarded

✔️ Ui.Web.Tests.SerilogUiMiddlewareTest

✔️ It hits ui endpoint when request matches method and custom options prefix(pathReq: "/test/", statusCode: 400)
✔️ It hits ui endpoint when request matches method and custom options prefix(pathReq: "/test/api/keys/", statusCode: 417)
✔️ It hits ui endpoint when request matches method and custom options prefix(pathReq: "/test/api/logs/", statusCode: 409)
✔️ It hits ui endpoint when request matches method and custom options prefix(pathReq: "/test/index.html", statusCode: 418)
✔️ It hits ui endpoint when request matches method and options prefix(pathReq: "/serilog-ui/", statusCode: 400)
✔️ It hits ui endpoint when request matches method and options prefix(pathReq: "/serilog-ui/api/keys/", statusCode: 417)
✔️ It hits ui endpoint when request matches method and options prefix(pathReq: "/serilog-ui/api/logs/", statusCode: 409)
✔️ It hits ui endpoint when request matches method and options prefix(pathReq: "/serilog-ui/index.html", statusCode: 418)
✔️ It proceeds onwards when request does not match options prefix(pathReq: "/fake-prefix/", statusCode: 400)
✔️ It proceeds onwards when request does not match options prefix(pathReq: "/fake-prefix/index.html", statusCode: 418)
✔️ It proceeds onwards when request does not match options prefix(pathReq: "fake-prefix/api/keys/", statusCode: 417)
✔️ It proceeds onwards when request does not match options prefix(pathReq: "fake-prefix/api/logs/", statusCode: 409)
✔️ It proceeds onwards when request is not a get(pathReq: "/serilog-ui/", statusCode: 400)
✔️ It proceeds onwards when request is not a get(pathReq: "/serilog-ui/api/keys/", statusCode: 417)
✔️ It proceeds onwards when request is not a get(pathReq: "/serilog-ui/api/logs/", statusCode: 409)
✔️ It proceeds onwards when request is not a get(pathReq: "/serilog-ui/index.html", statusCode: 418)