-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: fix tests #6
Changes from all commits
9f425d7
4db5abd
b10a756
a83bccf
1b02967
64a0cc8
bde1132
8d43090
8df5c09
0f9c1b4
1005054
3176940
19b3229
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Format check | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
dotnet-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Format | ||
working-directory: ./src | ||
run: dotnet format --verify-no-changes | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ internal record RequestDetails | |
/// The HTTP method used to request the URL (GET, POST, PUT, etc). | ||
/// </summary> | ||
[JsonInclude] | ||
public HttpMethod HttpMethod { get; set; } | ||
public string HttpMethod { get; set; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a bit strange, not sure if it was a typo or on purpose. The JSON parser failed trying to convert this. The rest of the code did not complain after the change. |
||
|
||
/// <summary> | ||
/// The IP address of the client that initiated the request. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
using CloudNimble.Breakdance.Blazor; | ||
using Bunit; | ||
using CloudNimble.Breakdance.Blazor; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace Raygun4Net.Tests.Blazor.WebAssembly | ||
namespace Raygun.NetCore.Tests.Blazor.WebAssembly | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a recommendation by the IDE, to match the namespace definition with the folder name. |
||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
[TestClass] | ||
public class RaygunExceptionCatcherTests : BlazorBreakdanceTestBase | ||
{ | ||
|
||
#region Test Lifecycle | ||
|
||
[TestInitialize] | ||
|
@@ -21,16 +20,12 @@ public void Setup() | |
{ | ||
services.AddRaygunBlazor(context.Configuration); | ||
}); | ||
TestSetup(); | ||
TestSetup(JSRuntimeMode.Loose); | ||
} | ||
|
||
[TestCleanup] | ||
public void TearDown() => TestTearDown(); | ||
|
||
#endregion | ||
|
||
|
||
|
||
} | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"Raygun": { | ||
"ApiKey": "APIKEY" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tests failed to initialize because the |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IDE also displayed a warning here saying that
UAHints
could be null. One of the tests failed due to it being null too.