mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-14 14:23:34 +01:00
* netcore 2.1 * SimpleCommandLineParserTests * tests * SimpleCommandLineParserTests * test report * AspNetCoreSelfHost * Fixed Resharper warnings * tests * . * ResponseWithProxyTests ResponseWithProxyTests * postmanecho
27 lines
752 B
C#
27 lines
752 B
C#
using System.Threading.Tasks;
|
|
using NFluent;
|
|
using WireMock.Models;
|
|
using WireMock.ResponseBuilders;
|
|
using Xunit;
|
|
|
|
namespace WireMock.Net.Tests.ResponseBuilders
|
|
{
|
|
public class ResponseCreateTests
|
|
{
|
|
[Fact]
|
|
public async Task Response_Create_Func()
|
|
{
|
|
// Assign
|
|
var responseMessage = new ResponseMessage { StatusCode = 500 };
|
|
var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", "::1");
|
|
|
|
var response = Response.Create(() => responseMessage);
|
|
|
|
// Act
|
|
var providedResponse = await response.ProvideResponseAsync(request);
|
|
|
|
// Assert
|
|
Check.That(providedResponse).Equals(responseMessage);
|
|
}
|
|
}
|
|
} |