Ejemplo n.º 1
0
 public void ReadMinimalTimeSeriesV6()
 {
     using (DssReader r = new DssReader(TestUtility.BasePath + "sample6.dss"))
     {
         var ts = r.GetEmptyTimeSeries(new DssPath("//SACRAMENTO/PRECIP-INC/01Jan1877/1Day/OBS/"));
         Assert.AreEqual("INCHES", ts.Units);
         Assert.AreEqual("PER-CUM", ts.DataType);
     }
 }
Ejemplo n.º 2
0
        public void RegularDssPathCollection()
        {
            string dssFile = @".\tempdssfile.dss";
            string srcFile = TestUtility.BasePath + @"benchmarks6/BaldEDmbrk.dss";

            File.Delete(dssFile);
            CopyAsReadWrite(srcFile, dssFile);
            string path = @"/BALD EAGLE LOC HAV/105178.6/FLOW-CUM/17FEB1999-23FEB1999/1MIN/DAMBRKSIMBRCH/";

            using (DssReader dss = new DssReader(dssFile))
            {
                DssPathCollection paths = dss.GetCatalog(true);
                var dsspath             = paths.FindExactPath(path);
                var ts = dss.GetEmptyTimeSeries(dsspath);
                Assert.IsTrue(ts.Units == "ACRE-FT");
                Assert.IsTrue(ts.DataType == "INST-CUM");
            }
        }