F2k3 Translation - UML 2 Test Profile Example
- From: Gary Scott <garylscott@xxxxxxxxxxxxx>
- Date: Sun, 11 Mar 2007 15:51:35 GMT
What difficulties are likely if I attempt to translate the following language mappings for the UML 2 "test profile" to F2k3 or k8? It looks straightforward superficially anyway, although I don't know what assertTrue does or how to handle the throw.
public class MoneyTest extends TestCase
{
public void addSameMoney()
{
Money money1 = new Money(20, "USD"));
Money money2 = new Money(50, "USD"));
money1.add(money2);
assertTrue(money1.equals(new Money(70,"USD")));
}
public void addDifferentMoney()
{
Money money1 = new Money(20, "USD"));
Money money2 = new Money(50, "USD"));
Money bag1 = money1.add(money2);
assertTrue(bag1.contains(money1));
assertTrue(bag1.contains(money2));
}
protected void runTest throws Throwable()
{
addSameMoney();
addDifferentMoney();
}
}
--
Gary Scott
mailto:garylscott@sbcglobal dot net
Fortran Library: http://www.fortranlib.com
Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html
If you want to do the impossible, don't hire an expert because he knows it can't be done.
-- Henry Ford
.
- Prev by Date: Re: Aren't the fuddy-duddies in the group going to comment on Fortress
- Next by Date: Re: reset the video buffer
- Previous by thread: Any free Fortran 90-95 compilers for Cray Y-MP ?
- Next by thread: MR&C 7.9
- Index(es):
Relevant Pages
|