public void Test_ResponseHasCorrectTags_Succeeds() { var toc = new TestObjectsCreator(); var conn = toc.ApiConnector(); var currentDivision = toc.GetCurrentDivision(); var response = conn.DoGetRequest(toc.UriGlAccount(currentDivision), string.Empty); if (!response.Contains("\"d\"") || !response.Contains("\"results\"")) { throw new Exception("Response does not have correct tags (\"d\" or \"results\")."); } }
public void GetCollectionOfAccountsInJsonFormat_Succeeds() { var toc = new TestObjectsCreator(); var conn = new ApiConnection(toc.ApiConnector(), toc.UriCrmAccount(toc.GetCurrentDivision())); var c = new SimpleController(conn); List<dynamic> accounts = c.GetDynamic(string.Empty); // Test if list has entities (easy test, because actual entity count isn't known) if (accounts.Count < 1) { throw new Exception("User Story not correctly implemented: List of CRM/Accounts is empty"); } }
public void Setup() { var toc = new TestObjectsCreator(); _conn = new ApiConnection(toc.ApiConnector(), toc.UriGlAccount(toc.GetCurrentDivision())); }