public void testIngestAsync() { PrecogClient testClient = ServiceStack.CreatePrecogClient(SERVICE, testApiKey); IngestOptions options = new CSVIngestOptions(); options.Async=true; IngestResult result = testClient.Ingest(storePath, "blah,\n\n", options); //is async, so we don't expect results Assert.IsFalse(result.Completed); }
public void testIngestCSV() { PrecogClient testClient = ServiceStack.CreatePrecogClient(SERVICE, testApiKey); IngestOptions options = new CSVIngestOptions(); IngestResult response = testClient.Ingest(storePath, "blah,\n\n", options); Assert.AreEqual(1, response.Ingested); }
public void testIngestCsvWithOptions() { PrecogClient testClient = ServiceStack.CreatePrecogClient(SERVICE, testApiKey); CSVIngestOptions options = new CSVIngestOptions(); options.delimiter=","; options.quote="'"; options.escape="\\"; IngestResult response = testClient.Ingest(storePath, "blah,\n\n", options); Assert.AreEqual(1, response.Ingested); }