Browse Source

Drop brittle exception type assertion in RemoteServiceExceptionHandler test

Asserting GetType() == typeof(Exception) locks the test to the base
type. The remaining message assertions already cover the intent of
ensuring the underlying JSON parse error does not surface.
pull/25443/head
maliming 4 months ago
parent
commit
d3ab33a82d
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 1
      framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler_Tests.cs

1
framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler_Tests.cs

@ -49,7 +49,6 @@ public class RemoteServiceExceptionHandler_Tests
var exception = await Should.ThrowAsync<Exception>(() => _handler.EnsureSuccessfulHttpResponseAsync(response));
exception.GetType().ShouldBe(typeof(Exception));
exception.Message.ShouldContain("403-Forbidden");
exception.Message.ShouldNotContain("invalid start of a value");
}

Loading…
Cancel
Save