insightly-api
Diff Revisions
12
vs
13
for /trunk/UnitTestInsightly/GetTests.cs
|
@@ -214,5 +214,40 @@ |
214 |
214 |
|
|
215 |
215 |
|
|
216 |
216 |
|
#endregion Linked Contacts and Organisations |
|
217 |
+ |
|
|
218 |
+ |
#region Projects |
|
219 |
+ |
|
|
220 |
+ |
private const int CRMTrainingId = 884059; |
|
221 |
+ |
|
|
222 |
+ |
/// <summary> |
|
223 |
+ |
/// Test returns project record smith enterprises crm training for CRM project unique identifier. |
|
224 |
+ |
/// </summary> |
|
225 |
+ |
[TestMethod] |
|
226 |
+ |
public void GetSmithEnterprisesCRMTrainingForCRMProjectId() |
|
227 |
+ |
{ |
|
228 |
+ |
InsightlyAPI api = new InsightlyAPI(APIUser.PLAIN_API_KEY); |
|
229 |
+ |
|
|
230 |
+ |
var project = api.GetProject(CRMTrainingId); |
|
231 |
+ |
|
|
232 |
+ |
Assert.IsNotNull(project); |
|
233 |
+ |
Assert.IsInstanceOfType(project, typeof(Project)); |
|
234 |
+ |
Assert.AreEqual(CRMTrainingId, project.PROJECT_ID); |
|
235 |
+ |
} |
|
236 |
+ |
|
|
237 |
+ |
/// <summary> |
|
238 |
+ |
/// Test getting the basic project details. |
|
239 |
+ |
/// </summary> |
|
240 |
+ |
[TestMethod] |
|
241 |
+ |
public void GetBasicProjectDetails() |
|
242 |
+ |
{ |
|
243 |
+ |
InsightlyAPI api = new InsightlyAPI(APIUser.PLAIN_API_KEY); |
|
244 |
+ |
|
|
245 |
+ |
var projects = api.GetProjects(false); |
|
246 |
+ |
|
|
247 |
+ |
Assert.IsTrue(projects.Count > 0); |
|
248 |
+ |
Assert.IsNull(projects[0].LINKS); |
|
249 |
+ |
} |
|
250 |
+ |
|
|
251 |
+ |
#endregion Projects |
217 |
252 |
|
} |
218 |
253 |
|
} |