forked from microsoft/azure-devops-dotnet-samples
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
4 changed files
with
73 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
Team Services REST API Sample Code | ||
Team Services REST API and .Net Client Library Sample Code | ||
=================== | ||
|
||
This repo will eventually be chuck of code samples when using the REST API's in Team Services. Code is specifically optimized to be simple to read and understands. | ||
This repo contains code samples for using the REST API's and .Net Client Libraries in Team Services. Code is optimized to be simple and easy to understand. | ||
|
||
This is an active repo and we will be adding new code samples weekly. Feel free to contribute and/or provide feedback. | ||
|
||
Let us know if you have any questions. | ||
Feel free to contribute and/or provide feedback. |
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
39 changes: 39 additions & 0 deletions
39
VSTSRestApiSamples.UnitTests/WorkItemTracking/SamplesTest.cs
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using VstsRestApiSamples.WorkItemTracking; | ||
using System.Net; | ||
|
||
namespace VstsRestApiSamples.Tests.WorkItemTracking | ||
{ | ||
[TestClass] | ||
public class SamplesTest | ||
{ | ||
private IConfiguration _configuration = new Configuration(); | ||
|
||
[TestInitialize] | ||
public void TestInitialize() | ||
{ | ||
InitHelper.GetConfiguration(_configuration); | ||
} | ||
|
||
[TestCleanup] | ||
public void TestCleanup() | ||
{ | ||
_configuration = null; | ||
} | ||
|
||
[TestMethod, TestCategory("REST API")] | ||
public void WorkItemTracking_Samples_CreateBug_Success() | ||
{ | ||
//arrange | ||
Samples samples = new Samples(_configuration); | ||
|
||
//act | ||
var response = samples.CreateNewBug(); | ||
|
||
//assert | ||
Assert.AreEqual("success", response); | ||
|
||
samples = null; | ||
} | ||
} | ||
} |
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