1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/samples/composition/src-test/api/ArithmeticaTest.java Sat Jun 14 09:51:04 2008 +0200
1.3 @@ -0,0 +1,46 @@
1.4 +/*
1.5 + * Žluťoučký kůň je naše hříbátko.
1.6 + * and open the template in the editor.
1.7 + */
1.8 +
1.9 +package api;
1.10 +
1.11 +import junit.framework.TestCase;
1.12 +
1.13 +/**
1.14 + *
1.15 + * @author Jaroslav Tulach <jtulach@netbeans.org>
1.16 + */
1.17 +public class ArithmeticaTest extends TestCase {
1.18 +
1.19 + public ArithmeticaTest(String testName) {
1.20 + super(testName);
1.21 + }
1.22 +
1.23 + @Override
1.24 + protected void setUp() throws Exception {
1.25 + super.setUp();
1.26 + }
1.27 +
1.28 + @Override
1.29 + protected void tearDown() throws Exception {
1.30 + super.tearDown();
1.31 + }
1.32 +
1.33 + public void testSumTwo() {
1.34 + Arithmetica instance = new Arithmetica();
1.35 + assertEquals("+", 5, instance.sumTwo(3, 2));
1.36 + }
1.37 +
1.38 + public void testSumAll() {
1.39 + Arithmetica instance = new Arithmetica();
1.40 + assertEquals("+", 6, instance.sumAll(3, 2, 1));
1.41 + }
1.42 +
1.43 + public void testSumRange() {
1.44 + Arithmetica instance = new Arithmetica();
1.45 + assertEquals("+", 6, instance.sumRange(1, 3));
1.46 + assertEquals("10", 55, instance.sumRange(1, 10));
1.47 + }
1.48 +
1.49 +}