Loading ...
Sorry, an error occurred while loading the content.

62596Re: [XP] Final Wizard Article

Expand Messages
  • Edmund Schweppe
    Sep 30, 2002
      Charlie Poole wrote:
      > Thanks for the feedback. Comments below.

      Sure thing!

      > > Charlie Poole wrote:
      > > > The three are all linked from my articles page at
      > > > http:charliepoole.org/cp.php?p=articles
      > > A couple of (minor?) nits:
      > > Are the pages *supposed* to have blank <TITLE> tags?
      > It's an artifact of how I create the pages - I could
      > put one in that says "CharliePoole.org - Article" but
      > ultimately I'd prefer it to have a real title. That
      > may not happen till I convert to XML for the articles.

      Hmmm. I don't know what the php script looks like, but I'd bet it's
      possible to pass the title to it somehow. OTOH, I'm not the Customer
      here :-)

      > > In the new Execute() method, the code looks roughly like:
      > >
      > > int step = 0;
      > > int nsteps = 2;
      > > Form[] form = { new TestFixtureTypeForm( this ),
      > > new TestFixtureOptionsForm( this ) };
      > > while ( step >=0 && step < nsteps ) {
      > > form[step].ShowDialog();
      > >
      > > etc.
      > > Doesn't C# support some way to get array lengths easily, along the lines
      > > of Java's .length property? A separate nsteps variable is duplication;
      > > and of course, not following DRY means you're all wet!
      >
      > Your right... it's form.Length. Shows I'm still thinking in terms
      > of C++ arrays, I guess.

      > > You've got a couple of switch statements in there - any thoughts towards
      > > refactoring them out along the lines of Fowler's Replace Conditional
      > > With Polymorphism?
      > I actually like them as they are, at least for now.

      Fair enough. (My gut feeling is that the test generator switch() is
      calling for a state/strategy type pattern, but I'm not completely sure.)


      > Now I do have one other idea - a wizard to generate wizards that use
      > C# and Windows Forms. But I'll want to do a few others by hand first.
      >
      > Any suggestions?

      Not off the top of my head; the only thought I have would be to drive
      towards the wizard - or *something* - making it easier / more natural to
      write test drivers...


      --
      Edmund Schweppe - schweppe@... - http://schweppe.home.tiac.net
      The opinions expressed herein are at best coincidentally related to
      those of any past or future employer. The position of present employer
      is currently open; contact me for further information!
    • Show all 4 messages in this topic