mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-13 05:45:54 +01:00
PathSegments (#114)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using NFluent;
|
||||
using WireMock.Util;
|
||||
using Xunit;
|
||||
|
||||
namespace WireMock.Net.Tests
|
||||
@@ -50,5 +51,25 @@ namespace WireMock.Net.Tests
|
||||
Check.That(request.GetParameter("key")).Contains("2");
|
||||
Check.That(request.GetParameter("key")).Contains("3");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RequestMessage_Constructor1_PathSegments()
|
||||
{
|
||||
// Assign
|
||||
var request = new RequestMessage(new Uri("http://localhost/a/b/c"), "POST", ClientIp);
|
||||
|
||||
// Assert
|
||||
Check.That(request.PathSegments).ContainsExactly("a", "b", "c");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RequestMessage_Constructor2_PathSegments()
|
||||
{
|
||||
// Assign
|
||||
var request = new RequestMessage(new Uri("http://localhost/a/b/c"), "POST", ClientIp, new BodyData());
|
||||
|
||||
// Assert
|
||||
Check.That(request.PathSegments).ContainsExactly("a", "b", "c");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user