Esempio n. 1
0
        public void SiteDatatypeEndPointQuery()
        {
            var sitedatatypeProcessor = new DataAccessLayer.SiteDataTypeRepository();
            var result = sitedatatypeProcessor.GetSiteDataTypes(conx, new string[] { "1930" }, new string[] { }, new string[] { });

            var siteProcessor = new DataAccessLayer.SiteRepository();
            var resultSite    = siteProcessor.GetSites(conx, new string[] { "921" });

            var datatypeProcessor = new DataAccessLayer.DataTypeRepository();
            var resultDatatype    = datatypeProcessor.GetDataTypes(conx, new string[] { "49" });

            if (result[0].datatype_id == "49" &&
                result[0].site_id == "921" &&
                result[0].site_datatype_id == "1930" &&
                result[0].metadata.site_metadata.site_id == resultSite[0].site_id &&
                result[0].metadata.site_metadata.state_id == resultSite[0].state_id &&
                result[0].metadata.site_metadata.objecttype_id == resultSite[0].objecttype_id &&
                result[0].metadata.datatype_metadata.datatype_id == resultDatatype[0].datatype_id &&
                result[0].metadata.datatype_metadata.unit_id == resultDatatype[0].unit_id)
            {
                Assert.AreEqual(1, 1);
            }
            else
            {
                Assert.AreEqual(0, 1);
            }
        }
Esempio n. 2
0
        public void DatatypeEndPointQuery()
        {
            var datatypeProcessor = new DataAccessLayer.DataTypeRepository();
            var result            = datatypeProcessor.GetDataTypes(conx, new string[] { "49" });

            if (result[0].datatype_common_name.ToLower() == "pool elevation" &&
                result[0].datatype_name.ToLower() == "reservoir ws elevation, end of period primary reading" &&
                result[0].datatype_id == "49" &&
                result[0].unit_name.ToLower() == "feet" &&
                result[0].physical_quantity_name.ToLower() == "water surface elevation")
            {
                Assert.AreEqual(1, 1);
            }
            else
            {
                Assert.AreEqual(0, 1);
            }
        }