Skip to content

Commit

Permalink
Replace FromUri with SetUri in Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NZSmartie committed Sep 22, 2017
1 parent a5b1c26 commit e131344
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/CoAPNet.Tests/CoapResourceHandlerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void TestResponse()
mockResource.Setup(r => r.Get(It.IsAny<CoapMessage>())).Returns(new CoapMessage());

var request = new CoapMessage { Code = CoapMessageCode.Get };
request.FromUri(new Uri(_baseUri, "/test"));
request.SetUri(new Uri(_baseUri, "/test"));

// Act
var service = new CoapResourceHandler();
Expand All @@ -83,7 +83,7 @@ public void TestGetRequest()
.Verifiable();

var request = new CoapMessage { Code = CoapMessageCode.Get };
request.FromUri(new Uri(_baseUri, "/test"));
request.SetUri(new Uri(_baseUri, "/test"));

// Act
var service = new CoapResourceHandler();
Expand All @@ -106,7 +106,7 @@ public void TestPostRequest()
.Verifiable();

var request = new CoapMessage { Code = CoapMessageCode.Post };
request.FromUri(new Uri(_baseUri, "/test"));
request.SetUri(new Uri(_baseUri, "/test"));

// Act
var service = new CoapResourceHandler();
Expand All @@ -129,7 +129,7 @@ public void TestPutRequest()
.Verifiable();

var request = new CoapMessage { Code = CoapMessageCode.Put };
request.FromUri(new Uri(_baseUri, "/test"));
request.SetUri(new Uri(_baseUri, "/test"));

// Act
var service = new CoapResourceHandler();
Expand All @@ -152,7 +152,7 @@ public void TestDeleteRequest()
.Verifiable();

var request = new CoapMessage { Code = CoapMessageCode.Delete };
request.FromUri(new Uri(_baseUri, "/test"));
request.SetUri(new Uri(_baseUri, "/test"));

// Act
var service = new CoapResourceHandler();
Expand Down Expand Up @@ -181,7 +181,7 @@ public void TestResourceMethodNotImplemented()
.Throws(new NotImplementedException());

var request = new CoapMessage { Code = CoapMessageCode.Get };
request.FromUri(new Uri(_baseUri, "/test"));
request.SetUri(new Uri(_baseUri, "/test"));

// Act
var service = new CoapResourceHandler();
Expand Down Expand Up @@ -210,7 +210,7 @@ public void TestResourceMethodBadOption()
.Throws(new NotImplementedException());

var request = new CoapMessage {Code = CoapMessageCode.Get, Options = {new CoapOption(111111)}};
request.FromUri(new Uri(_baseUri, "/test"));
request.SetUri(new Uri(_baseUri, "/test"));

// Act
var service = new CoapResourceHandler();
Expand All @@ -234,7 +234,7 @@ public void TestResourceNotFound()
.Verifiable();

var request = new CoapMessage { Code = CoapMessageCode.Get };
request.FromUri(new Uri(_baseUri, "/test"));
request.SetUri(new Uri(_baseUri, "/test"));

// Act
var service = new CoapResourceHandler();
Expand Down Expand Up @@ -262,7 +262,7 @@ public void TestResourceInternalError()
.Throws(new Exception("Somne generic exception"));

var request = new CoapMessage { Code = CoapMessageCode.Get };
request.FromUri(new Uri(_baseUri, "/test"));
request.SetUri(new Uri(_baseUri, "/test"));

// Act
var service = new CoapResourceHandler();
Expand Down

0 comments on commit e131344

Please sign in to comment.