Esempio n. 1
0
        public void TestHistoryExecuteCmd_Click01()
        {
            HistDataPointListModel model = new HistDataPointListModel();
            Accessor   ctlAccessor       = ReflectionAccessor.Wrap(trendViewController);
            TrendCache cache             = (TrendCache)(ctlAccessor.GetField("m_trendCache"));

            cache.m_histDataPointList    = model.GetHistDListByGrp(TestConst.HIST_GROUP_NAME);
            cache.m_histDatapointGrpName = TestConst.HIST_GROUP_NAME;
            trendViewController.HistoryExecuteCmd_Click(null, null);
        }
Esempio n. 2
0
        public void TestExportHistoryDataToolStripMenuItem_Click02()
        { // catch exception in func ExportHistoryDataToolStripMenuItem_Click02(
            Accessor               ctlAccessor = ReflectionAccessor.Wrap(trendViewController);
            TrendCache             cache       = (TrendCache)(ctlAccessor.GetField("m_trendCache"));
            HistDataPointListModel model       = new HistDataPointListModel();

            cache.m_histDataPointList    = model.GetHistDListByGrp(TestConst.HIST_GROUP_NAME);
            cache.m_histDatapointGrpName = TestConst.HIST_GROUP_NAME;
            trendViewController.ExportHistoryDataToolStripMenuItem_Click(null, null);
        }
Esempio n. 3
0
        public void TestGetEnabledMarkerList()
        {
            TrendCache trendCache = new TrendCache();

            trendCache.m_markerList = new List <EtyMarker>();
            EtyMarker marker = new EtyMarker();

            marker.MarkerEnabled = true;
            trendCache.m_markerList.Add(marker);
            trendCache.GetEnabledMarkerList();
        }
Esempio n. 4
0
        public void TestRealTimeExecuteCmd_Click02()
        {
            //test  If user click "stop"
            DataPointListModel model = new DataPointListModel();

            Accessor   ctlAccessor = ReflectionAccessor.Wrap(trendViewController);
            TrendCache cache       = (TrendCache)(ctlAccessor.GetField("m_trendCache"));

            cache.m_dataPointList    = model.GetDPListByGrp("");
            cache.m_datapointGrpName = "";
            trendViewController.RealTimeExecuteCmd_Click(null, null);
        }
Esempio n. 5
0
        public void TestExportHistoryData01()
        {
            // m_Model.GetHistDPLogList has data
            Accessor               ctlAccessor = ReflectionAccessor.Wrap(trendViewController);
            TrendCache             cache       = (TrendCache)(ctlAccessor.GetField("m_trendCache"));
            HistDataPointListModel model       = new HistDataPointListModel();

            cache.m_histDataPointList           = model.GetHistDListByGrp(TestConst.HIST_GROUP_NAME);
            cache.m_histDataPointList[0].DPName = "NotEmpty";
            cache.m_histDatapointGrpName        = TestConst.HIST_GROUP_NAME;

            ctlAccessor.Call("ExportHistoryData", "a.csv");
        }
Esempio n. 6
0
        public void TestGetHistDPLogMap()
        {
            HistDataPointListModel model = new HistDataPointListModel();

            Accessor   ctlAccessor = ReflectionAccessor.Wrap(trendViewController);
            TrendCache cache       = (TrendCache)(ctlAccessor.GetField("m_trendCache"));

            cache.m_histDataPointList    = model.GetHistDListByGrp(TestConst.HIST_GROUP_NAME);
            cache.m_histDatapointGrpName = TestConst.HIST_GROUP_NAME;

            DateTime fromTime = new DateTime(2013, 1, 10);
            DateTime toTime   = new DateTime(2013, 1, 12);

            trendViewController.GetHistDPLogMap(fromTime, toTime);
        }
Esempio n. 7
0
        public void TestRealTimeExecuteCmd_Click01()
        {
            //test  If user click "start"
            DataPointListModel model = new DataPointListModel();

            Accessor   ctlAccessor = ReflectionAccessor.Wrap(trendViewController);
            TrendCache cache       = (TrendCache)(ctlAccessor.GetField("m_trendCache"));

            cache.m_dataPointList    = model.GetDPListByGrp("");
            cache.m_datapointGrpName = "";
            trendViewController.RealTimeExecuteCmd_Click(null, null);


            cache.m_dataPointList    = model.GetDPListByGrp(TestConst.GROUP_NAME);
            cache.m_datapointGrpName = TestConst.GROUP_NAME;
            IView     view        = ViewManager.GetInstance().GetView(TrendViewConst.TrendView); //viewID is ""
            TrendView frm         = (TrendView)view;
            Accessor  frmAccessor = ReflectionAccessor.Wrap(frm);

            System.Windows.Forms.CheckBox checkbox = (System.Windows.Forms.CheckBox)frmAccessor.GetField("mixedModeCb");
            checkbox.Checked = true;
            frmAccessor.SetField("mixedModeCb", checkbox);
            trendViewController.RealTimeExecuteCmd_Click(null, null);
        }
Esempio n. 8
0
 public void TestTrendCacheConstructor01()
 {
     TrendCache trendCache = new TrendCache();
 }