-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6c6763
commit 6ff81ed
Showing
4 changed files
with
51 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -654,6 +654,34 @@ public async Task PatchEmployee_WithDelete() | |
} | ||
} | ||
|
||
[Fact] | ||
public async Task PatchEmployee_WithODataBind() | ||
{ | ||
//Arrange | ||
|
||
string requestUri = this.BaseAddress + "/convention/Employees(1)"; | ||
|
||
var content = @"{ | ||
'Name':'Bind1' , | ||
'[email protected]':['Friends(3)'] | ||
}"; | ||
|
||
var requestForPost = new HttpRequestMessage(new HttpMethod("PATCH"), requestUri); | ||
|
||
StringContent stringContent = new StringContent(content: content, encoding: Encoding.UTF8, mediaType: "application/json"); | ||
requestForPost.Content = stringContent; | ||
|
||
//Act & Assert | ||
using (HttpResponseMessage response = await this.Client.SendAsync(requestForPost)) | ||
{ | ||
var json = response.Content.ReadAsStringAsync().Result; | ||
Assert.Equal(HttpStatusCode.OK, response.StatusCode); | ||
} | ||
|
||
|
||
|
||
} | ||
|
||
|
||
[Fact] | ||
public async Task PatchEmployee_WithAddUpdateAndDelete() | ||
|