|
@@ -43,28 +43,28 @@ namespace Terminal.Gui.Views {
|
|
d.SetBufferSize (width, 3);
|
|
d.SetBufferSize (width, 3);
|
|
|
|
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btnText));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btnText));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Justify
|
|
// Justify
|
|
buttonRow = $"{d.VLine} {d.LeftBracket} {btnText} {d.RightBracket}{d.VLine}";
|
|
buttonRow = $"{d.VLine} {d.LeftBracket} {btnText} {d.RightBracket}{d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Justify, new Button (btnText));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Justify, new Button (btnText));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Right
|
|
// Right
|
|
buttonRow = $"{d.VLine} {d.LeftBracket} {btnText} {d.RightBracket}{d.VLine}";
|
|
buttonRow = $"{d.VLine} {d.LeftBracket} {btnText} {d.RightBracket}{d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btnText));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btnText));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Left
|
|
// Left
|
|
buttonRow = $"{d.VLine}{d.LeftBracket} {btnText} {d.RightBracket} {d.VLine}";
|
|
buttonRow = $"{d.VLine}{d.LeftBracket} {btnText} {d.RightBracket} {d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btnText));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btnText));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -91,28 +91,28 @@ namespace Terminal.Gui.Views {
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
|
|
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btn1Text), new Button (btn2Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btn1Text), new Button (btn2Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Justify
|
|
// Justify
|
|
buttonRow = $@"{d.VLine}{btn1} {btn2}{d.VLine}";
|
|
buttonRow = $@"{d.VLine}{btn1} {btn2}{d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Justify, new Button (btn1Text), new Button (btn2Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Justify, new Button (btn1Text), new Button (btn2Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Right
|
|
// Right
|
|
buttonRow = $@"{d.VLine} {btn1} {btn2}{d.VLine}";
|
|
buttonRow = $@"{d.VLine} {btn1} {btn2}{d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btn1Text), new Button (btn2Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btn1Text), new Button (btn2Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Left
|
|
// Left
|
|
buttonRow = $@"{d.VLine}{btn1} {btn2} {d.VLine}";
|
|
buttonRow = $@"{d.VLine}{btn1} {btn2} {d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btn1Text), new Button (btn2Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btn1Text), new Button (btn2Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -149,7 +149,7 @@ namespace Terminal.Gui.Views {
|
|
//button1.Visible = false;
|
|
//button1.Visible = false;
|
|
//Application.RunMainLoopIteration (ref runstate, true, ref firstIteration);
|
|
//Application.RunMainLoopIteration (ref runstate, true, ref firstIteration);
|
|
//buttonRow = $@"{d.VLine} {btn2} {d.VLine}";
|
|
//buttonRow = $@"{d.VLine} {btn2} {d.VLine}";
|
|
- //GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ //DriverAsserts.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
//Application.End (runstate);
|
|
//Application.End (runstate);
|
|
|
|
|
|
// Justify
|
|
// Justify
|
|
@@ -160,21 +160,21 @@ namespace Terminal.Gui.Views {
|
|
button1.Visible = false;
|
|
button1.Visible = false;
|
|
Application.RunMainLoopIteration (ref runstate, true, ref firstIteration);
|
|
Application.RunMainLoopIteration (ref runstate, true, ref firstIteration);
|
|
buttonRow = $@"{d.VLine} {btn2}{d.VLine}";
|
|
buttonRow = $@"{d.VLine} {btn2}{d.VLine}";
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
//// Right
|
|
//// Right
|
|
//buttonRow = $@"{d.VLine} {btn1} {btn2}{d.VLine}";
|
|
//buttonRow = $@"{d.VLine} {btn1} {btn2}{d.VLine}";
|
|
//Assert.Equal (width, buttonRow.Length);
|
|
//Assert.Equal (width, buttonRow.Length);
|
|
//(runstate, dlg) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btn1Text), new Button (btn2Text));
|
|
//(runstate, dlg) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btn1Text), new Button (btn2Text));
|
|
- //GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ //DriverAsserts.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
//Application.End (runstate);
|
|
//Application.End (runstate);
|
|
|
|
|
|
//// Left
|
|
//// Left
|
|
//buttonRow = $@"{d.VLine}{btn1} {btn2} {d.VLine}";
|
|
//buttonRow = $@"{d.VLine}{btn1} {btn2} {d.VLine}";
|
|
//Assert.Equal (width, buttonRow.Length);
|
|
//Assert.Equal (width, buttonRow.Length);
|
|
//(runstate, dlg) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btn1Text), new Button (btn2Text));
|
|
//(runstate, dlg) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btn1Text), new Button (btn2Text));
|
|
- //GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ //DriverAsserts.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
//Application.End (runstate);
|
|
//Application.End (runstate);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -203,28 +203,28 @@ namespace Terminal.Gui.Views {
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
|
|
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Justify
|
|
// Justify
|
|
buttonRow = $@"{d.VLine}{btn1} {btn2} {btn3}{d.VLine}";
|
|
buttonRow = $@"{d.VLine}{btn1} {btn2} {btn3}{d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Justify, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Justify, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Right
|
|
// Right
|
|
buttonRow = $@"{d.VLine} {btn1} {btn2} {btn3}{d.VLine}";
|
|
buttonRow = $@"{d.VLine} {btn1} {btn2} {btn3}{d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Left
|
|
// Left
|
|
buttonRow = $@"{d.VLine}{btn1} {btn2} {btn3} {d.VLine}";
|
|
buttonRow = $@"{d.VLine}{btn1} {btn2} {btn3} {d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -256,28 +256,28 @@ namespace Terminal.Gui.Views {
|
|
|
|
|
|
// Default - Center
|
|
// Default - Center
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Justify
|
|
// Justify
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {btn3} {btn4}{d.VLine}";
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {btn3} {btn4}{d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Justify, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Justify, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Right
|
|
// Right
|
|
buttonRow = $"{d.VLine} {btn1} {btn2} {btn3} {btn4}{d.VLine}";
|
|
buttonRow = $"{d.VLine} {btn1} {btn2} {btn3} {btn4}{d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Left
|
|
// Left
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {btn3} {btn4} {d.VLine}";
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {btn3} {btn4} {d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -312,28 +312,28 @@ namespace Terminal.Gui.Views {
|
|
|
|
|
|
// Default - Center
|
|
// Default - Center
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Justify
|
|
// Justify
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {btn3} {btn4}{d.VLine}";
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {btn3} {btn4}{d.VLine}";
|
|
Assert.Equal (width, ustring.Make (buttonRow).ConsoleWidth);
|
|
Assert.Equal (width, ustring.Make (buttonRow).ConsoleWidth);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Justify, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Justify, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Right
|
|
// Right
|
|
buttonRow = $"{d.VLine} {btn1} {btn2} {btn3} {btn4}{d.VLine}";
|
|
buttonRow = $"{d.VLine} {btn1} {btn2} {btn3} {btn4}{d.VLine}";
|
|
Assert.Equal (width, ustring.Make (buttonRow).ConsoleWidth);
|
|
Assert.Equal (width, ustring.Make (buttonRow).ConsoleWidth);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Left
|
|
// Left
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {btn3} {btn4} {d.VLine}";
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {btn3} {btn4} {d.VLine}";
|
|
Assert.Equal (width, ustring.Make (buttonRow).ConsoleWidth);
|
|
Assert.Equal (width, ustring.Make (buttonRow).ConsoleWidth);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -367,28 +367,28 @@ namespace Terminal.Gui.Views {
|
|
|
|
|
|
// Default - Center
|
|
// Default - Center
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Justify
|
|
// Justify
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {btn3} {btn4}{d.VLine}";
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {btn3} {btn4}{d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Justify, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Justify, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Right
|
|
// Right
|
|
buttonRow = $"{d.VLine} {btn1} {btn2} {btn3} {btn4}{d.VLine}";
|
|
buttonRow = $"{d.VLine} {btn1} {btn2} {btn3} {btn4}{d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Right, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Left
|
|
// Left
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {btn3} {btn4} {d.VLine}";
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {btn3} {btn4} {d.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Left, new Button (btn1Text), new Button (btn2Text), new Button (btn3Text), new Button (btn4Text));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -409,7 +409,7 @@ namespace Terminal.Gui.Views {
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
|
|
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, null);
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, null);
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
}
|
|
}
|
|
@@ -432,7 +432,7 @@ namespace Terminal.Gui.Views {
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
|
|
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btnText));
|
|
(runstate, var _) = RunButtonTestDialog (title, width, Dialog.ButtonAlignments.Center, new Button (btnText));
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -461,56 +461,56 @@ namespace Terminal.Gui.Views {
|
|
var dlg = new Dialog (title, width, 3, new Button (btn1Text)) { ButtonAlignment = Dialog.ButtonAlignments.Center };
|
|
var dlg = new Dialog (title, width, 3, new Button (btn1Text)) { ButtonAlignment = Dialog.ButtonAlignments.Center };
|
|
runstate = Application.Begin (dlg);
|
|
runstate = Application.Begin (dlg);
|
|
var buttonRow = $"{d.VLine} {btn1} {d.VLine}";
|
|
var buttonRow = $"{d.VLine} {btn1} {d.VLine}";
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
// Now add a second button
|
|
// Now add a second button
|
|
buttonRow = $"{d.VLine} {btn1} {btn2} {d.VLine}";
|
|
buttonRow = $"{d.VLine} {btn1} {btn2} {d.VLine}";
|
|
dlg.AddButton (new Button (btn2Text));
|
|
dlg.AddButton (new Button (btn2Text));
|
|
bool first = false;
|
|
bool first = false;
|
|
Application.RunMainLoopIteration (ref runstate, true, ref first);
|
|
Application.RunMainLoopIteration (ref runstate, true, ref first);
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Justify
|
|
// Justify
|
|
dlg = new Dialog (title, width, 3, new Button (btn1Text)) { ButtonAlignment = Dialog.ButtonAlignments.Justify };
|
|
dlg = new Dialog (title, width, 3, new Button (btn1Text)) { ButtonAlignment = Dialog.ButtonAlignments.Justify };
|
|
runstate = Application.Begin (dlg);
|
|
runstate = Application.Begin (dlg);
|
|
buttonRow = $"{d.VLine} {btn1}{d.VLine}";
|
|
buttonRow = $"{d.VLine} {btn1}{d.VLine}";
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
// Now add a second button
|
|
// Now add a second button
|
|
buttonRow = $"{d.VLine}{btn1} {btn2}{d.VLine}";
|
|
buttonRow = $"{d.VLine}{btn1} {btn2}{d.VLine}";
|
|
dlg.AddButton (new Button (btn2Text));
|
|
dlg.AddButton (new Button (btn2Text));
|
|
first = false;
|
|
first = false;
|
|
Application.RunMainLoopIteration (ref runstate, true, ref first);
|
|
Application.RunMainLoopIteration (ref runstate, true, ref first);
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Right
|
|
// Right
|
|
dlg = new Dialog (title, width, 3, new Button (btn1Text)) { ButtonAlignment = Dialog.ButtonAlignments.Right };
|
|
dlg = new Dialog (title, width, 3, new Button (btn1Text)) { ButtonAlignment = Dialog.ButtonAlignments.Right };
|
|
runstate = Application.Begin (dlg);
|
|
runstate = Application.Begin (dlg);
|
|
buttonRow = $"{d.VLine}{new String (' ', width - btn1.Length - 2)}{btn1}{d.VLine}";
|
|
buttonRow = $"{d.VLine}{new String (' ', width - btn1.Length - 2)}{btn1}{d.VLine}";
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
// Now add a second button
|
|
// Now add a second button
|
|
buttonRow = $"{d.VLine} {btn1} {btn2}{d.VLine}";
|
|
buttonRow = $"{d.VLine} {btn1} {btn2}{d.VLine}";
|
|
dlg.AddButton (new Button (btn2Text));
|
|
dlg.AddButton (new Button (btn2Text));
|
|
first = false;
|
|
first = false;
|
|
Application.RunMainLoopIteration (ref runstate, true, ref first);
|
|
Application.RunMainLoopIteration (ref runstate, true, ref first);
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
|
|
|
|
// Left
|
|
// Left
|
|
dlg = new Dialog (title, width, 3, new Button (btn1Text)) { ButtonAlignment = Dialog.ButtonAlignments.Left };
|
|
dlg = new Dialog (title, width, 3, new Button (btn1Text)) { ButtonAlignment = Dialog.ButtonAlignments.Left };
|
|
runstate = Application.Begin (dlg);
|
|
runstate = Application.Begin (dlg);
|
|
buttonRow = $"{d.VLine}{btn1}{new String (' ', width - btn1.Length - 2)}{d.VLine}";
|
|
buttonRow = $"{d.VLine}{btn1}{new String (' ', width - btn1.Length - 2)}{d.VLine}";
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
// Now add a second button
|
|
// Now add a second button
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {d.VLine}";
|
|
buttonRow = $"{d.VLine}{btn1} {btn2} {d.VLine}";
|
|
dlg.AddButton (new Button (btn2Text));
|
|
dlg.AddButton (new Button (btn2Text));
|
|
first = false;
|
|
first = false;
|
|
Application.RunMainLoopIteration (ref runstate, true, ref first);
|
|
Application.RunMainLoopIteration (ref runstate, true, ref first);
|
|
- GraphViewTests.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ($"{topRow}\n{buttonRow}\n{bottomRow}", output);
|
|
Application.End (runstate);
|
|
Application.End (runstate);
|
|
}
|
|
}
|
|
}
|
|
}
|