private void GetTypeToTestFromAUT() { if (applicationUT.Length <= 0) { return; } TypeUnderTest typeDUT = new TypeUnderTest(); try { Assembly asm = Assembly.LoadFrom(applicationUT); Type[] tys = asm.GetTypes(); foreach (Type ty in tys) { typeDUT.chckListType.Items.Add(ty.Namespace + "." + ty.Name); } } catch (Exception ex) { MessageBox.Show(ex.Message); return; } if (typeDUT.ShowDialog() == DialogResult.OK) { GetSelectedTypesUT(typeDUT); } else { return; } }
private void GetSelectedTypesUT(TypeUnderTest typeDUT) { startupForm = ""; for (int i = 0; i < typeDUT.chckListType.Items.Count; i++) { if (typeDUT.chckListType.GetItemChecked(i)) { startupForm = typeDUT.chckListType.GetItemText(typeDUT.chckListType.Items[i]); } } }
private void GetTypeToTestFromAUT() { if (applicationUT.Length <= 0) { return; } TypeUnderTest typeDUT = new TypeUnderTest(); try { Assembly asm = Assembly.LoadFrom(applicationUT); Type[] tys = asm.GetTypes(); foreach (Type ty in tys) { typeDUT.chckListType.Items.Add(ty.Namespace + "." + ty.Name); } } //Chapter 14 catch (BadImageFormatException badImgEx) { GUITestUtility.StartAUTAsProcess(applicationUT, ""); applicationUT = null; return; } catch (Exception ex) { MessageBox.Show(ex.Message); return; } if (typeDUT.ShowDialog() == DialogResult.OK) { GetSelectedTypesUT(typeDUT); } else { return; } }