public void SeriesMtableInsertEndPoint() { var hdbProcessor = new HdbApi.App_Code.HdbCommands(); var result = hdbProcessor.modify_m_table_raw(conx, testMRID, Convert.ToInt16(testSDI), testT, testVal, testInterval, testBool); var seriesProcessor = new DataAccessLayer.SeriesRepository(); var verification = seriesProcessor.GetSeries(conx, testSDI, testInterval, testT, testT, "M", testMRID); Assert.AreEqual(testVal.ToString(), verification.data[0].value); hdbProcessor.delete_from_hdb(conx, Convert.ToInt16(testSDI), testT, testInterval, testMRID); }
public void SeriesRtableDeleteEndPoint() { var hdbProcessor = new HdbApi.App_Code.HdbCommands(); var result = hdbProcessor.modify_r_base_raw(conx, Convert.ToInt16(testSDI), testInterval, testT, testVal, testBool, testFlag, testBool);//, testLoadingApplicationId); hdbProcessor.delete_from_hdb(conx, Convert.ToInt16(testSDI), testT, testInterval); var seriesProcessor = new DataAccessLayer.SeriesRepository(); var verification = seriesProcessor.GetSeries(conx, testSDI, testInterval, testT, testT); Assert.AreEqual(null, verification.data[0].value); }
public void SeriesEndPointQuery() { var seriesProcessor = new DataAccessLayer.SeriesRepository(); var result = seriesProcessor.GetSeries(conx, "1930", "month", new DateTime(1980, 1, 1, 0, 0, 0), new DateTime(1980, 1, 1, 0, 0, 0)); if (result.data[0].value == "1198.98999" && result.metadata.site_metadata.site_id == "921" && result.metadata.datatype_metadata.datatype_id == "49") { Assert.AreEqual(1, 1); } else { Assert.AreEqual(0, 1); } }
public OkObjectResult Get(string id) { var seriesProcessor = new DataAccessLayer.SeriesRepository(); return(Ok(seriesProcessor.GetSeries(id))); }