LingoUnit

[ English | Japanese || Home | Project Summary ]
Last updated: Wed, 31 Oct 2001 10:46:10 GMT

LingoUnit is a Unit Testing framework for Macromedia Director. The most part of this framework is based on JUnit.


Contents


About xUnit


Screenshots

screenshot 1 -- GUITestRunner screenshot 2 -- libraly palette screenshot 3 -- message window

Shockwave Demo

This demo requires Shockwave plugin 8.5.0 or later.


Required Environment

These scripts may work with Macromedia Director 8.0, but you will require 8.5 or later to open .cst/.dir files. (Because I have only 8.5 license...)


Download

Please download from File List.

The archive includes below files.


Installation

  1. Put GUITestRunner.dir into Xtras folder.
  2. Put LingoUnitTemplates.cst into Libs folder.
  3. Put the other files anywhere you want.

How Does It Work?


Sample Scripts

test case


property ancestor, pValue

on new me, testName
  ancestor = script("TestCase", "LingoUnit").new(testName)
  return me
end

on setUp me
  pValue = PI
end

on testSample me
  me.assertTrue(TRUE)
  me.assertEquals(integer(pValue), 3)
  me.assertEqualsDelta(pValue, 3.0, 0.1416)
  me.assertVoid(VOID)
  me.assertNotVoid(pValue)
  me.assertEquals("abc", "ABC", "NOTE: Case insensitive")
  me.assertEqualsCS("Abc", "Abc", "NOTE: Case sensitive")
end

suite factory


on suite thisScript
  aTestSuite = script("TestSuite", "LingoUnit").new()

  -- add TestCase
  aTestSuite.addTest(script("TestCaseMemberName2", "CastlibName").new("testName"))

  -- add TestSuite
  aTestSuite.addTest(script("AllTests", "CastlibName").suite())

  -- add all test* handlers
  aTestSuite.addTestSuite(member("TestCaseMemberName", "CastlibName"))

  return aTestSuite
end

MoneySample


Documentation


History

See File List page.


License

LingoUnit is distributed under the MIT License. Prease see the LICENSE file in the archive.


Koseki Kengo <kengo@tt.rim.or.jp>

Hosted by SourceForge Logo