Wiki: Network Example

# Network Example

We will be experimenting with acceptance testing technique using radio network routing algorithms as a sufficiently complicated example. Our testbed will be a recently reincarnated simulation which we have described briefly elsewhere. http://c2.com/~ward/mors ... Net/SimView.html. -- WardCunningham

The simulator starts with no nodes. The new city button pops up a dialog for city information. Try http:run.cgi.

fit.ActionFixture
start | eg.net.Simulator |
check | nodes | 0
press | new city |
enter | name | Portland
enter | zip | 1,1,1
enter | population | 1.5e6
enter | coord | 45 30.0 n 122 45.0 w
check | coord | N45.5 W122.75
press | ok |
check | nodes | 1
press | new city |
enter | name | Salem
enter | population | .6e6
enter | zip | 1,1,2
enter | coord | 44 59' 22" n 122 28' 59" w
press | ok |
check | nodes | 2
press | new city |
enter | name | Seattle
press | cancel |
check | nodes | 2

An ActionFixture delegates much of its work to other fixtures (actors). See the source for the actor(s) in use here.

- http:Release/Source/eg/net/Simulator.java

This fixture employs a domain specific ValueObject called a GeoCoordinate. The framework goes to some lenght to make sure such objects can be parsed and printed within the framework. Actual parsing and printing are easily delegated to the domain object, as they are here by GeoCoordinate, which accepts a wide variety of coordinate notations.

- http:Release/Source/eg/n ... oCoordinate.java

Last edited September 10, 2002