Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

by Unknown user

Read Part 5

Having dealt with most of the messy UI code, I'm ready for some clean, efficient, highly rational business logic. This is work I usually do in unit tests. And the first thing I need is a unit test app, one that will run with my ClarionTest unit testing framework. 

...

Step two is to get a clean compile ( and a failed test).. If the test doesn't fail at this stage then it's clearly not a good test!

I do have an empty class on hand, so I need to include that globally:

...

Code Block
    ManyToMany.SetLinkTo(RightRecordX)
    ManyToMany.SetLinkTo(RightRecordZ)
    AssertThat(ManyToMany.IsLinkedTo(RightRecordX),IsEqualTo(true), 'Test 1 failed')
    AssertThat(ManyToMany.IsLinkedTo(RightRecordY),IsEqualTo(false),'Test 2 failed')
    AssertThat(ManyToMany.IsLinkedTo(RightRecordZ),IsEqualTo(true), 'Test 3 failed')

Next time I'll finish wiring the Links object into my UITest application, which no doubt will lead to further code changes.