public void ActJavaElementAction() { //Arrange ActJavaElement act = new ActJavaElement(); act.WaitforIdle = ActJavaElement.eWaitForIdle.Medium; act.LocateBy = eLocateBy.ByName; act.LocateValue = "ABC"; act.Value = "123"; act.ControlAction = ActJavaElement.eControlAction.SetValue; //Act PayLoad pl = act.Pack(); byte[] b = pl.GetPackage(); PayLoad pl2 = new PayLoad(b); pl2.DumpToConsole(); string WaitForIdle = pl2.GetValueEnum(); string LocateBy = pl2.GetValueEnum(); string LocateValue = pl2.GetValueString(); string Value = pl2.GetValueString(); string ControlAction = pl2.GetValueEnum(); //Assert Assert.AreEqual(act.LocateBy.ToString(), LocateBy); Assert.AreEqual(act.LocateValue, LocateValue); Assert.AreEqual(act.Value, Value); Assert.AreEqual(act.ControlAction.ToString(), ControlAction); }
public ActJavaElementEditPage(ActJavaElement act) { InitializeComponent(); mAct = act; GingerCore.General.FillComboFromEnumObj(ControlActionComboBox, mAct.ControlAction); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ControlActionComboBox, ComboBox.SelectedValueProperty, mAct, ActJavaElement.Fields.ControlAction); GingerCore.General.FillComboFromEnumObj(WaitforIdleComboBox, mAct.WaitforIdle); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(WaitforIdleComboBox, ComboBox.SelectedValueProperty, mAct, ActJavaElement.Fields.WaitforIdle); }
public ActJavaElementEditPage(ActJavaElement act) { InitializeComponent(); mAct = act; App.FillComboFromEnumVal(ControlActionComboBox, mAct.ControlAction); App.ObjFieldBinding(ControlActionComboBox, ComboBox.SelectedValueProperty, mAct, ActJavaElement.Fields.ControlAction); App.FillComboFromEnumVal(WaitforIdleComboBox, mAct.WaitforIdle); App.ObjFieldBinding(WaitforIdleComboBox, ComboBox.SelectedValueProperty, mAct, ActJavaElement.Fields.WaitforIdle); }
public void DumpTest() { //Arrange ActJavaElement act = new ActJavaElement(); act.LocateBy = eLocateBy.ByName; act.LocateValue = "ABC"; act.Value = "123"; act.ControlAction = ActJavaElement.eControlAction.SetValue; PayLoad pl = act.Pack(); byte[] b = pl.GetPackage(); PayLoad pl2 = new PayLoad(b); //Act pl2.DumpToConsole(); //Assert }