Exemplo n.º 1
0
        public void FixtureSetUp()
        {
            oPCDataSelectorController = new OPCDataSelectorController();
            IModel model = new OPCSampleGrpConfig.Model.OPCDataSelectorModel();

            OPCSampleGrpConfig.View.OPCDataSelector viewob = OPCDataSelectorFactory.CreateOPCDataSelector01();
            oPCDataSelectorController.Attach(model, viewob);
        }
Exemplo n.º 2
0
 public static System.Collections.Generic.List <Entity.Trending.EtyOPCDataNode> GetAllOPCDataNodesTSS(
     OPCSampleGrpConfig.Model.OPCDataSelectorModel target,
     System.String serverRootName, System.String opcServerName)
 {
     System.Collections.Generic.List <Entity.Trending.EtyOPCDataNode> etyList = new System.Collections.Generic.List <Entity.Trending.EtyOPCDataNode>();
     Entity.Trending.EtyOPCDataNode datanode = new Entity.Trending.EtyOPCDataNode();
     datanode.OPCDataNodeName = "testing";
     etyList.Add(datanode);
     return(etyList);
 }
Exemplo n.º 3
0
 public static System.Collections.Generic.List <Entity.Trending.EtyDataLogDPTrend> GetAllOPCDataPointsTSS(
     OPCSampleGrpConfig.Model.OPCDataSelectorModel target,
     System.String opcServerName, System.String filterString)
 {
     System.Collections.Generic.List <Entity.Trending.EtyDataLogDPTrend> etylist = new System.Collections.Generic.List <Entity.Trending.EtyDataLogDPTrend>();
     Entity.Trending.EtyDataLogDPTrend datapoint = new Entity.Trending.EtyDataLogDPTrend();
     datapoint.OPCDataPointName = "testing";
     etylist.Add(datapoint);
     return(etylist);
 }
Exemplo n.º 4
0
        public static System.Boolean CheckStationGrpTSS(
            OPCSampleGrpConfig.Model.OPCDataSelectorModel target,
            System.String dataPoint, System.String currentGrpLocation)
        {
            string testName = Dottest.Framework.Stubs.CurrentTestMethod.Name;

            if (testName == "TestCanAddDataPoint03")
            {
                return(false);
            }
            return(true);
        }
Exemplo n.º 5
0
        public static System.Boolean CheckConfiguredByOccTSS(
            OPCSampleGrpConfig.Model.OPCDataSelectorModel target,
            System.String dataPoint)
        {
            string TestName = Dottest.Framework.Stubs.CurrentTestMethod.Name;

            if (TestName == "TestCanAddDataPoint01")
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 6
0
        public static void BeginTransactionMSS(
            OPCSampleGrpConfig.Model.OPCDataSelectorModel target)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { target }, out result))
            {
                return;
            }
            else
            {
                target.BeginTransaction();
            }
        }
Exemplo n.º 7
0
        public static System.Boolean UpdateVersionNumMSS(
            OPCSampleGrpConfig.Model.OPCDataSelectorModel target)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { target }, out result))
            {
                return((System.Boolean)result);
            }
            else
            {
                return(target.UpdateVersionNum());
            }
        }
Exemplo n.º 8
0
        public static System.Boolean CheckStationGrpMSS(
            OPCSampleGrpConfig.Model.OPCDataSelectorModel target,
            System.String dataPoint, System.String currentGrpLocation)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { target, dataPoint, currentGrpLocation }, out result))
            {
                return((System.Boolean)result);
            }
            else
            {
                return(target.CheckStationGrp(dataPoint, currentGrpLocation));
            }
        }
Exemplo n.º 9
0
        public static System.Collections.Generic.List <Entity.Trending.EtyOPCDataNode> GetAllOPCDataNodesMSS(
            OPCSampleGrpConfig.Model.OPCDataSelectorModel target,
            System.String serverRootName, System.String opcServerName)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { target, serverRootName, opcServerName }, out result))
            {
                return((System.Collections.Generic.List <Entity.Trending.EtyOPCDataNode>)result);
            }
            else
            {
                return(target.GetAllOPCDataNodes(serverRootName, opcServerName));
            }
        }
Exemplo n.º 10
0
        public static System.Collections.Generic.List <Entity.Trending.EtyDataLogDPTrend> GetAllOPCDataPointsMSS(
            OPCSampleGrpConfig.Model.OPCDataSelectorModel target,
            System.String opcServerName, System.String filterString)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { target, opcServerName, filterString }, out result))
            {
                return((System.Collections.Generic.List <Entity.Trending.EtyDataLogDPTrend>)result);
            }
            else
            {
                return(target.GetAllOPCDataPoints(opcServerName, filterString));
            }
        }
Exemplo n.º 11
0
        public static System.Boolean UpdateDataPointDBMSS(
            OPCSampleGrpConfig.Model.OPCDataSelectorModel target,
            Entity.Trending.EtyDataLogDPTrend etyDataPoint)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { target, etyDataPoint }, out result))
            {
                return((System.Boolean)result);
            }
            else
            {
                return(target.UpdateDataPointDB(etyDataPoint));
            }
        }
Exemplo n.º 12
0
        public void TestopcItemDataGridView_CellDoubleClick01()
        {
            //using (OPCDataSelectorController oPCDataSelectorController = OPCDataSelectorControllerFactory.CreateOPCDataSelectorController01())
            // {
            System.Windows.Forms.DataGridViewCellEventArgs e = new System.Windows.Forms.DataGridViewCellEventArgs(0, 0);
            Accessor oPCDataSelectorControllerAccessor       = ReflectionAccessor.Wrap(oPCDataSelectorController);

            oPCDataSelectorControllerAccessor.GetFieldAccessor("m_view").Call("InitializeOpcItemDataGridView");
            OPCSampleGrpConfig.Model.OPCDataSelectorModel model = OPCSampleGrpConfig.DotTest.Factories.Model.OPCDataSelectorModelFactory.CreateOPCDataSelectorModel01();
            Accessor controllerAccessor = ReflectionAccessor.Wrap(oPCDataSelectorController);

            controllerAccessor.Call("Attach", model, oPCDataSelectorControllerAccessor.GetFieldAccessor("m_view"));

            System.Windows.Forms.DataGridView gridView = (System.Windows.Forms.DataGridView)oPCDataSelectorControllerAccessor.GetFieldAccessor("m_view").GetField("opcItemDataGridView");
            gridView.Rows.Add();
            System.Windows.Forms.DataGridViewRow row1 = gridView.Rows[0];
            row1.Cells[0].Value = "1";
            row1.Cells[1].Value = "1";

            //Test Procedure Call
            oPCDataSelectorController.opcItemDataGridView_CellDoubleClick(gridView, e);
            // }
        }
Exemplo n.º 13
0
 public static void BeginTransactionTSS(
     OPCSampleGrpConfig.Model.OPCDataSelectorModel target)
 {
     return;
 }
Exemplo n.º 14
0
 public static System.Boolean UpdateVersionNumTSS(
     OPCSampleGrpConfig.Model.OPCDataSelectorModel target)
 {
     return(true);
 }
Exemplo n.º 15
0
 public static System.Boolean UpdateDataPointDBTSS(
     OPCSampleGrpConfig.Model.OPCDataSelectorModel target,
     Entity.Trending.EtyDataLogDPTrend etyDataPoint)
 {
     return(true);
 }