// Update is called once per frame void Update() { if (_frame++ % PollFrameFrequency == 0) { LatestMessage = Downloader.DownloadData(); } //Debug.Log(LatestMessage.SequenceId); }
public void TestDataDownloader() { List <SourceData> data = DataDownloader.DownloadData(); Assert.AreEqual <int>(data.Count, 10); //下面 3 个主要是用来测试 SourceData 各个属性的 get 访问器,没有实际作用。 Assert.IsInstanceOfType(data[0].OnlineChange, typeof(string)); Assert.IsInstanceOfType(data[0].OnlineTime, typeof(DateTime)); Assert.IsInstanceOfType(data[0].OnlineNumber, typeof(string)); Assert.IsTrue(data[0].Equals(data[0])); Assert.IsFalse(data[0].Equals(data[1])); }
static void Main(string[] args) { // Set the Certificate Policy System.Net.ServicePointManager.CertificatePolicy = new CustomCertificate(); Arguments arguments; // Parse the command line arguments if (!parseCommandLineArguments(args, out arguments)) { Console.Error.WriteLine(("Usage DownloadRepoData <userName> <password> <companyId> <fromDate> <toDate> <outputFileName>")); return; } // Create an instance of the DataDownloader and connect var downloader = new DataDownloader(); downloader.Connect(arguments); //// Download the data downloader.DownloadData(); } // method Main
public void UpdateElementFromFeatureTest() { DataDownloader target = new DataDownloader(config); // TODO: Initialize to an appropriate value long pageid = pagetotest; // TODO: Initialize to an appropriate value string tablename = "unit_testing"; // TODO: Initialize to an appropriate value string workspacepath = @"C:\Users\trav5516\Sandbox\Output"; IWorkspace workspace; workspace = target.SchemaBuilder(pageid, workspacepath,false); workspace = target.DownloadData(pageid, tablename, workspace,1); DataUpdater updater = new DataUpdater(config); IFeature feature = null; Page schemapage = null; updater.UpdateElementFromFeature(feature, schemapage); Assert.Inconclusive("A method that does not return a value cannot be verified."); }