mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-25 01:38:27 +02:00
Support deleting / resetting a single scenario (#834)
* Support deleting / resetting a single scenario * move files
This commit is contained in:
@@ -603,5 +603,31 @@ public class WireMockAdminApiTests
|
||||
|
||||
server.Stop();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task IWireMockAdminApi_DeleteScenarioUsingDeleteAsync()
|
||||
{
|
||||
// Arrange
|
||||
var name = "x";
|
||||
var server = WireMockServer.StartWithAdminInterface();
|
||||
var api = RestClient.For<IWireMockAdminApi>(server.Urls[0]);
|
||||
|
||||
// Act
|
||||
var status = await api.DeleteScenarioAsync(name).ConfigureAwait(false);
|
||||
status.Status.Should().Be("No scenario found by name 'x'.");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task IWireMockAdminApi_DeleteScenarioUsingPostAsync()
|
||||
{
|
||||
// Arrange
|
||||
var name = "x";
|
||||
var server = WireMockServer.StartWithAdminInterface();
|
||||
var api = RestClient.For<IWireMockAdminApi>(server.Urls[0]);
|
||||
|
||||
// Act
|
||||
var status = await api.ResetScenarioAsync(name).ConfigureAwait(false);
|
||||
status.Status.Should().Be("No scenario found by name 'x'.");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user