public void TestGetCalcValues1() { Uri uri = new Uri(TestConfig.serviceUrl); var context = new DamServiceRef.Container(uri); context.Format.UseJson(); var app = context.Apps.Where(s => s.AppName == "第一支仪器").SingleOrDefault(); var result = context.GetCalcValues(new Guid[] { app.Id }, 0, null, null); int cnt = result.Count(); Assert.AreEqual(true, cnt > 0, "返回的数据数目不对!"); }
public void TestGetCalcValues3() { Uri uri = new Uri(TestConfig.serviceUrl); var context = new DamServiceRef.Container(uri); context.Format.UseJson(); var app = context.Apps.Where(s => s.AppName == "第一支仪器").SingleOrDefault(); // Invoke the SayHello action const int num = 10; var result = context.GetCalcValues(new Guid[] { app.Id }, num, null, DateTimeOffset.MaxValue).ToList(); int cnt = result.Count(); Assert.AreEqual(num, cnt, "返回的数据数目不对!"); }
public void TestGetCalcValues4() { Uri uri = new Uri(TestConfig.serviceUrl); var context = new DamServiceRef.Container(uri); context.Format.UseJson(); var app = context.Apps.Where(s => s.AppName == "第一支仪器" || s.AppName == "第三支仪器").ToList(); var appids = (from i in app select i.Id).ToList(); const int num = 15; var result = context.GetCalcValues(appids, num, null, null); int cnt = result.Count(); //第一支仪器有20个数据 //第三支仪器有10个数据 Assert.AreEqual(25, cnt, "返回的数据数目不对!"); }