public void BlockType_ChangeBlockType_ComboboxSelectedItemChangeToCorrectBlockType(string input, string output) { //Assign ViewModel = new BlockConditionsWindowViewModel(); obj = ViewModel.CurrentblockConditionModel as BlockConditions; string actual; string expect; //Act obj.SortBlockConditions(input); ViewModel.BlockType_ChangedByBlockClass(ViewModel.CurrentblockConditionModel); actual = obj.BlockType.ToString(); expect = ViewModel.ComboboxSelectedItem.BlockTypeIDcode.ToString(); //Assert Assert.AreEqual(expect, actual); }
public void Download_ComboboxSelectedItemChangeToCorrectBlockType(string input, string ouput) { //Assign ViewModel = new BlockConditionsWindowViewModel(); ViewModel._keyenceCommunicationService = new MockKeyenceCommunicationService(input); ViewModel._dialogService = new StubDialogServiceAlwaysYes(); string actual; string expect; string[] inputStringArray = input.Split(','); //Act ViewModel.BlockConditionDownload(); expect = inputStringArray[3]; //actual = ViewModel.CurrentblockConditionModel.BlockType; ViewModel.BlockType_ChangedByBlockClass(); ViewModel.OnBlockTypeChanged(); actual = ViewModel.ComboboxSelectedItem.BlockTypeIDcode; //Assert Assert.AreEqual(expect, actual); }