| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
package uk.me.parabola.imgfmt.app.labelenc; |
| 14 |
|
| 15 |
import org.junit.Test; |
| 16 |
import static org.junit.Assert.*; |
| 17 |
|
| 18 |
public class Format6EncoderTest { |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
@Test |
| 24 |
public void testEmptyGivesZeroResult() { |
| 25 |
Format6Encoder fmt = new Format6Encoder(); |
| 26 |
|
| 27 |
EncodedText enc = fmt.encodeText(""); |
| 28 |
assertEquals(0, enc.getLength()); |
| 29 |
} |
| 30 |
|
| 31 |
@Test |
| 32 |
public void testEmptyGivesNullChars() { |
| 33 |
Format6Encoder fmt = new Format6Encoder(); |
| 34 |
|
| 35 |
EncodedText enc = fmt.encodeText(""); |
| 36 |
assertNull(enc.getChars()); |
| 37 |
} |
| 38 |
|
| 39 |
@Test |
| 40 |
public void testEmptyGivesNullCtext() { |
| 41 |
Format6Encoder fmt = new Format6Encoder(); |
| 42 |
|
| 43 |
EncodedText enc = fmt.encodeText(""); |
| 44 |
assertNull(enc.getCtext()); |
| 45 |
} |
| 46 |
} |