aboutsummaryrefslogtreecommitdiffstats
path: root/tests/multiIncremental/pr121384/inc1/moodytest/AnnotationMoodTester.java
blob: 332bf8585c7a2d38007f47cce7dfbd2710bbd009 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package moodytest;

import moodytest.AnnotationMoodyImplementor;
import moodytest.Mood;
import junit.framework.TestCase;

public class AnnotationMoodTester extends TestCase {
	   AnnotationMoodyImplementor ami0 = null;
	   AnnotationMoodyImplementor ami1 = null;

	   public AnnotationMoodTester(String name) { super(name); }

	   protected void setUp() throws Exception {
	      ami0 = new AnnotationMoodyImplementor();
	      ami1 = new AnnotationMoodyImplementor();
	   }

	   public void testHappyDefault() {
	      assertEquals("ami0 should be happy!", Mood.HAPPY, ami0.getMood());
	   }

	   public void testOneConfused() {
	      ami0.setMood(Mood.CONFUSED);
	      assertEquals("ami0 should now be confused", Mood.CONFUSED,
	 ami0.getMood());
	      assertEquals("ami1 should still be happy", Mood.HAPPY,
	 ami1.getMood());
	   }
}