예제 #1
0
파일: XmlParserTest.cs 프로젝트: hkiaipc/c2
        public void soft()
        {
            //CommuniSoft s = new CommuniSoft();

            DeviceDefineBuilderBase d = new XmlDeviceDefineBuild( "xml\\devicedefine.xml" );
            HardwareBuilderBase h = new XmlHardwareBuilder("xml\\hardware.xml");
            TaskFactoryCollectionBuilder t = new XmlTaskFactoryCollectionBuilder("xml\\task.xml");
            ListenBuilderBase l = new XmlListenBuilder("xml\\listenport.xml");

            CommuniSoftBuilder b = new CommuniSoftBuilder(d, h, t, l);
            b.Build( CommuniSoft.Default);

            CommuniSoft soft = CommuniSoft.Default;

            //Opera op = soft.OperaFactory.Create("vdevicetype", "operaname");
            //Assert.IsNotNull(op);
            //Assert.AreEqual("operaname", op.Name);
            //Assert.AreEqual(1, op.SendPart.DataFieldManager.DataFields.Count);

            //Assert.AreEqual(1, soft.HardwareManager.Stations.Count);
            //Assert.AreEqual(1, soft.HardwareManager.Stations[0].Devices.Count);
            //Assert.AreEqual(100, soft.HardwareManager.Stations[0].Devices[0].Address);
            ////Assert.AreEqual("vdevicetype", soft.HardwareManager.Stations[0].Devices[0].DeviceType);

            //Assert.AreEqual(1, soft.TaskManager.Tasks.Count);
        }
예제 #2
0
파일: UITestLogic.cs 프로젝트: hkiaipc/c2
        public UITestLogic()
        {
            DeviceDefineBuilderBase d = new XmlDeviceDefineBuild( "xml\\devicedefine.xml" );
            HardwareBuilderBase h = new XmlHardwareBuilder("xml\\hardware.xml");
            TaskFactoryCollectionBuilder t = new XmlTaskFactoryCollectionBuilder("xml\\task.xml");
            ListenBuilderBase l = new XmlListenBuilder("xml\\listenport.xml");

            CommuniSoftBuilder b = new CommuniSoftBuilder(d, h, t, l);
            //Soft = b.Build();
            b.Build(CommuniSoft.Default);
            Soft = CommuniSoft.Default;
        }