Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | package de.viathinksoft.distributed.apps.immortal.iterator.marschall; |
2 | |||
3 | import static org.junit.Assert.fail; |
||
4 | |||
5 | import org.junit.Test; |
||
6 | |||
7 | import de.viathinksoft.distributed.apps.immortal.exception.InitialNumberIsOneException; |
||
8 | import de.viathinksoft.distributed.apps.immortal.exception.InitialNumberNotImmortableException; |
||
9 | import de.viathinksoft.distributed.apps.immortal.iterator.marschall.SectionImmortableNumber; |
||
10 | |||
11 | public class SectionImmortableNumberTest { |
||
12 | |||
13 | @Test |
||
14 | public void oneExceptionTest() throws InitialNumberNotImmortableException { |
||
15 | try { |
||
16 | new SectionImmortableNumber(1); |
||
17 | fail(); |
||
18 | } catch (InitialNumberIsOneException e) { |
||
19 | } |
||
20 | } |
||
21 | |||
22 | @Test |
||
23 | public void mortableExceptionTest() throws InitialNumberIsOneException { |
||
24 | try { |
||
25 | new SectionImmortableNumber(12); |
||
26 | fail(); |
||
27 | } catch (InitialNumberNotImmortableException e) { |
||
28 | } |
||
29 | } |
||
30 | |||
31 | @Test |
||
32 | public void successfulConstructTest() throws InitialNumberNotImmortableException, InitialNumberIsOneException { |
||
33 | new SectionImmortableNumber(25); |
||
34 | } |
||
35 | |||
36 | } |