

insightly-api
@ 13
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
using Microsoft.VisualStudio.TestTools.UnitTesting; using TS.Insightly.API; using TS.Insightly.API.Contract; namespace UnitTestInsightly { /// <summary> /// Test class for various methods to delete details from insightly. /// </summary> [TestClass] public class DeleteTests { #region Contacts /// <summary> /// Test deleting a contact that is in the system. /// </summary> [TestMethod] public void DeleteExistingContact() { InsightlyAPI api = new InsightlyAPI(APIUser.PLAIN_API_KEY); Contact newContact = new Contact(); newContact.SALUTATION = "Dr"; newContact.FIRST_NAME = "Temp"; newContact.LAST_NAME = "Delete"; Contact addedContact = api.AddNewContact(newContact); Assert.IsNotNull(addedContact, "Failed to add contact to test delete!"); bool deleteResult = api.DeleteContact(addedContact.CONTACT_ID); Assert.IsTrue(deleteResult); } /// <summary> /// Test deleting a non existent contact. /// </summary> [TestMethod] public void DeleteNonExistentContact() { InsightlyAPI api = new InsightlyAPI(APIUser.PLAIN_API_KEY); bool deleteResult = api.DeleteContact(1); Assert.IsFalse(deleteResult); } #endregion Contacts #region Organisations #endregion Organisations } } |
Commits for insightly-api/trunk/UnitTestInsightly/DeleteTests.cs
Revision | Author | Commited | Message |
---|---|---|---|
12
![]() |
|
Wed 25 Sep, 2013 08:15:31 +0000 | Added link DTO. |
10
![]() |
|
Tue 24 Sep, 2013 12:06:30 +0000 | Added basic organisation functionality, at the moment cannot link organisation to contact. |
4 |
|
Fri 20 Sep, 2013 15:08:23 +0000 | Added code and tests to add a basic contact with email address. |