use of material.beam.fragments.ChlapikBeamFragments in project Zong by Xenoage.
the class BeamFragmenterTest method computeTest.
@Test
public void computeTest() {
ChlapikBeamFragments source = new ChlapikBeamFragments();
Beam b;
// example of row 1, column 1
b = source.exampleRow1Col1();
try {
// not working for 8th lines
testee.compute(b, 0, null);
fail();
} catch (IllegalArgumentException ex) {
// ok
}
Fragments wp = testee.compute(b, 2, null);
// 32th
assertEqualsList(wp, None, None, None);
// 16th
assertEqualsList(testee.compute(b, 1, wp), HookRight, None, HookLeft);
// example of row 1, column 2
b = source.exampleRow1Col2();
// 16th
assertEqualsList(testee.compute(b, 1, null), HookRight, None, HookLeft);
// example of row 1, column 3
b = source.exampleRow1Col3();
// 16th
assertEqualsList(testee.compute(b, 1, null), HookRight, None, None, HookLeft);
// example of row 1, column 4
b = source.exampleRow1Col4();
// 16th
assertEqualsList(testee.compute(b, 1, null), HookRight, None, None, HookLeft);
// example of row 2, column 1
b = source.exampleRow2Col1();
// 16th
assertEqualsList(testee.compute(b, 1, null), None, HookLeft);
// example of row 2, column 2
b = source.exampleRow2Col2();
// 16th
assertEqualsList(testee.compute(b, 1, null), None, HookLeft);
// example of row 2, column 3
b = source.exampleRow2Col3();
wp = testee.compute(b, 2, null);
// 32th
assertEqualsList(wp, None, HookLeft, None, HookLeft);
// 16th
assertEqualsList(testee.compute(b, 1, wp), Start, None, None, Stop);
// example of row 2, column 4
b = source.exampleRow2Col4();
wp = testee.compute(b, 2, null);
// 32th
assertEqualsList(wp, None, HookLeft, None, HookLeft);
// 16th
assertEqualsList(testee.compute(b, 1, wp), Start, None, None, Stop);
// example of row 3, column 2
b = source.exampleRow3Col2();
// 16th
assertEqualsList(testee.compute(b, 1, null), HookRight, None, HookLeft, None);
// example of row 3, column 4
b = source.exampleRow3Col4();
// 16th
assertEqualsList(testee.compute(b, 1, null), None, HookRight, None);
// example of row 3, column 6
b = source.exampleRow3Col6();
wp = testee.compute(b, 2, null);
// 32th
assertEqualsList(wp, None, HookLeft, None, HookLeft);
// 16th
assertEqualsList(testee.compute(b, 1, wp), None, HookLeft, Start, Stop);
}
use of material.beam.fragments.ChlapikBeamFragments in project Zong by Xenoage.
the class BeamTest method getMaxLinesCountTest.
@Test
public void getMaxLinesCountTest() {
ChlapikBeamFragments source = new ChlapikBeamFragments();
assertEquals(2, source.exampleRow1Col1().getMaxLinesCount());
assertEquals(2, source.exampleRow1Col2().getMaxLinesCount());
assertEquals(2, source.exampleRow1Col3().getMaxLinesCount());
assertEquals(2, source.exampleRow1Col4().getMaxLinesCount());
assertEquals(2, source.exampleRow2Col1().getMaxLinesCount());
assertEquals(2, source.exampleRow2Col2().getMaxLinesCount());
assertEquals(3, source.exampleRow2Col3().getMaxLinesCount());
assertEquals(3, source.exampleRow2Col4().getMaxLinesCount());
assertEquals(3, source.exampleRow2Col5().getMaxLinesCount());
assertEquals(3, source.exampleRow2Col6().getMaxLinesCount());
assertEquals(2, source.exampleRow3Col2().getMaxLinesCount());
assertEquals(2, source.exampleRow3Col4().getMaxLinesCount());
assertEquals(3, source.exampleRow3Col6().getMaxLinesCount());
}
Aggregations