public void TestTableLayoutNineItemsTwoRows() { Vector2 size = new Vector2(18, 3); List <string> lines = new List <string>(); lines.Add("1111"); lines.Add("2222"); lines.Add("3333"); lines.Add("4444"); lines.Add("5555"); lines.Add("6666"); lines.Add("7777"); lines.Add("8888"); lines.Add("9999"); CConsoleViewCellEntry entry = new CConsoleViewCellEntry(lines.ToArray()); entry.Layout(this, size.x); AssertCellEntryLayout(entry, size, "1111" + kSpace + "4444" + kSpace + "7777" + "\n" + "2222" + kSpace + "5555" + kSpace + "8888" + "\n" + "3333" + kSpace + "6666" + kSpace + "9999" ); }
public void TestFlowLayoutSinglelWordMoreThanMaxWidth() { Vector2 size = new Vector2(5, 1); string line = "12345"; CConsoleViewCellEntry entry = new CConsoleViewCellEntry(line); entry.Layout(this, size.x - 1); AssertCellEntryLayout(entry, size, "12345" ); }
public void TestTableLayoutThreeItemsSingleRow() { Vector2 size = new Vector2(18, 1); string[] lines = { "111", "22", "3333" }; CConsoleViewCellEntry entry = new CConsoleViewCellEntry(lines); entry.Layout(this, size.x); AssertCellEntryLayout(entry, size, "111 " + kSpace + "22 " + kSpace + "3333" ); }
public void TestTableLayoutSingleItem() { Vector2 size = new Vector2(14, 1); string[] lines = { "1111" }; CConsoleViewCellEntry entry = new CConsoleViewCellEntry(lines); entry.Layout(this, size.x); AssertCellEntryLayout(entry, size, "1111" ); }
public void TestTableLayoutFourItemsTwoRows() { Vector2 size = new Vector2(14, 2); string[] lines = { "1111", "2222", "3333", "4444" }; CConsoleViewCellEntry entry = new CConsoleViewCellEntry(lines); entry.Layout(this, size.x); AssertCellEntryLayout(entry, size, "1111" + kSpace + "3333" + "\n" + "2222" + kSpace + "4444" ); }
public void TestTableLayoutSingleLongItemDontFit() { Vector2 size = new Vector2(3, 1); List <string> lines = new List <string>(); lines.Add("1111"); CConsoleViewCellEntry entry = new CConsoleViewCellEntry(lines.ToArray()); entry.Layout(this, size.x); AssertCellEntryLayout(entry, size, "1111" ); }
public void TestTableLayoutTwoItemsDifferentSizeSingleRow() { Vector2 size = new Vector2(18, 1); List <string> lines = new List <string>(); lines.Add("1111"); lines.Add("222222"); CConsoleViewCellEntry entry = new CConsoleViewCellEntry(lines.ToArray()); entry.Layout(this, size.x); AssertCellEntryLayout(entry, size, "1111 " + kSpace + "222222" ); }
public void TestTableLayoutTwoItemsDifferentSizeThreeRows() { Vector2 size = new Vector2(14, 3); List <string> lines = new List <string>(); lines.Add("1111"); lines.Add("222222"); lines.Add("333333333"); CConsoleViewCellEntry entry = new CConsoleViewCellEntry(lines.ToArray()); entry.Layout(this, size.x); AssertCellEntryLayout(entry, size, "1111" + "\n" + "222222" + "\n" + "333333333" ); }