Esempio n. 1
0
 public void TestCreateView01()
 {
     OPCSampleGrpConfigViewFactory oPCSampleGrpConfigViewFactory = OPCSampleGrpConfigViewFactoryFactory.CreateOPCSampleGrpConfigViewFactory01();
     string type = string.Empty;
     string id   = string.Empty;
     IView  view = oPCSampleGrpConfigViewFactory.CreateView(type, id);
 }
Esempio n. 2
0
        public void TestCreateView02()
        {
            OPCSampleGrpConfigViewFactory oPCSampleGrpConfigViewFactory = OPCSampleGrpConfigViewFactoryFactory.CreateOPCSampleGrpConfigViewFactory01();
            string type = OPCSampleGrpConfigStart.OPCSAMPLEGRPCONFIGSTARTFRM;
            string id   = string.Empty;
            //Test Procedure Call
            IView view = oPCSampleGrpConfigViewFactory.CreateView(type, id);

            //Post Condition Check
            Assert.IsInstanceOfType(typeof(OPCSampleGrpConfigStart), view);
            Assert.IsNotNull(view.getController());

            //test2
            type = OPCDataSelector.OPCDATASELECTORFRM;
            id   = string.Empty;
            //Test Procedure Call
            TrendingHelper.ConfigureFileHelper.GetInstance().init();
            DAO.Trending.Common.DBConnectionStrings.GetInstance().AddConnectionString(TrendingHelper.ConfigureFileHelper.GetInstance().ConnectionStringConfig);
            view = oPCSampleGrpConfigViewFactory.CreateView(type, id);
            //Post Condition Check
            Assert.IsInstanceOfType(typeof(OPCSampleGrpConfig.View.OPCDataSelector), view);
            Assert.IsNotNull(view.getController());
        }