瀏覽代碼

Alignment->Justification

Tig 1 年之前
父節點
當前提交
40f72db0bd

+ 4 - 4
Terminal.Gui/Views/Slider.cs

@@ -930,7 +930,7 @@ public class Slider<T> : View
         }
     }
 
-    private string AlignText (string text, int width, Justification Justification)
+    private string JustifyText (string text, int width, Justification justification)
     {
         if (text is null)
         {
@@ -947,7 +947,7 @@ public class Slider<T> : View
         string s2 = new (' ', w % 2);
 
         // Note: The formatter doesn't handle all of this ???
-        switch (Justification)
+        switch (justification)
         {
             case Justification.Justified:
                 return TextFormatter.Justify (text, width);
@@ -1293,7 +1293,7 @@ public class Slider<T> : View
                     switch (_config._legendsOrientation)
                     {
                         case Orientation.Horizontal:
-                            text = AlignText (text, _config._innerSpacing + 1, Justification.Centered);
+                            text = JustifyText (text, _config._innerSpacing + 1, Justification.Centered);
 
                             break;
                         case Orientation.Vertical:
@@ -1311,7 +1311,7 @@ public class Slider<T> : View
 
                             break;
                         case Orientation.Vertical:
-                            text = AlignText (text, _config._innerSpacing + 1, Justification.Centered);
+                            text = JustifyText (text, _config._innerSpacing + 1, Justification.Centered);
 
                             break;
                     }

+ 2 - 2
Terminal.Gui/Views/TableView/TableView.cs

@@ -2057,13 +2057,13 @@ public class TableView : View
 
     /// <summary>
     ///     Truncates or pads <paramref name="representation"/> so that it occupies a exactly
-    ///     <paramref name="availableHorizontalSpace"/> using the alignment specified in <paramref name="colStyle"/> (or left
+    ///     <paramref name="availableHorizontalSpace"/> using the justification specified in <paramref name="colStyle"/> (or left
     ///     if no style is defined)
     /// </summary>
     /// <param name="originalCellValue">The object in this cell of the <see cref="Table"/></param>
     /// <param name="representation">The string representation of <paramref name="originalCellValue"/></param>
     /// <param name="availableHorizontalSpace"></param>
-    /// <param name="colStyle">Optional style indicating custom alignment for the cell</param>
+    /// <param name="colStyle">Optional style indicating custom justification for the cell</param>
     /// <returns></returns>
     private string TruncateOrPad (
         object originalCellValue,

+ 7 - 7
UICatalog/Scenarios/CsvEditor.cs

@@ -76,19 +76,19 @@ public class CsvEditor : Scenario
                                  new []
                                  {
                                      _miLeft = new MenuItem (
-                                                             "_Align Left",
+                                                             "_Justify Left",
                                                              "",
-                                                             () => Align (Justification.Left)
+                                                             () => Justify (Justification.Left)
                                                             ),
                                      _miRight = new MenuItem (
-                                                              "_Align Right",
+                                                              "_Justify Right",
                                                               "",
-                                                              () => Align (Justification.Right)
+                                                              () => Justify (Justification.Right)
                                                              ),
                                      _miCentered = new MenuItem (
-                                                                 "_Align Centered",
+                                                                 "_Justify Centered",
                                                                  "",
-                                                                 () => Align (Justification.Centered)
+                                                                 () => Justify (Justification.Centered)
                                                                 ),
 
                                      // Format requires hard typed data table, when we read a CSV everything is untyped (string) so this only works for new columns in this demo
@@ -218,7 +218,7 @@ public class CsvEditor : Scenario
         _tableView.Update ();
     }
 
-    private void Align (Justification newJustification)
+    private void Justify (Justification newJustification)
     {
         if (NoTableLoaded ())
         {

+ 21 - 21
UICatalog/Scenarios/TextFormatterDemo.cs

@@ -75,17 +75,17 @@ public class TextFormatterDemo : Scenario
             }
         }
 
-        List<Justification> alignments = GetUniqueEnumValues<Justification>().ToList ();
-        Label [] singleLines = new Label [alignments.Count];
-        Label [] multipleLines = new Label [alignments.Count];
+        List<Justification> justifications = GetUniqueEnumValues<Justification>().ToList ();
+        Label [] singleLines = new Label [justifications.Count];
+        Label [] multipleLines = new Label [justifications.Count];
 
         var multiLineHeight = 5;
 
-        foreach (Justification alignment in alignments)
+        foreach (Justification justification in justifications)
         {
-            singleLines [(int)alignment] = new()
+            singleLines [(int)justification] = new()
             {
-                Justification = alignment,
+                Justification = justification,
                 X = 0,
 
                 Width = Dim.Fill (),
@@ -94,9 +94,9 @@ public class TextFormatterDemo : Scenario
                 Text = text
             };
 
-            multipleLines [(int)alignment] = new()
+            multipleLines [(int)justification] = new()
             {
-                Justification = alignment,
+                Justification = justification,
                 X = 0,
 
                 Width = Dim.Fill (),
@@ -112,33 +112,33 @@ public class TextFormatterDemo : Scenario
         };
         app.Add (label);
 
-        foreach (Justification alignment in alignments)
+        foreach (Justification justification in justifications)
         {
-            label = new() { Y = Pos.Bottom (label), Text = $"{alignment}:" };
+            label = new() { Y = Pos.Bottom (label), Text = $"{justification}:" };
             app.Add (label);
-            singleLines [(int)alignment].Y = Pos.Bottom (label);
-            app.Add (singleLines [(int)alignment]);
-            label = singleLines [(int)alignment];
+            singleLines [(int)justification].Y = Pos.Bottom (label);
+            app.Add (singleLines [(int)justification]);
+            label = singleLines [(int)justification];
         }
 
         label = new() { Y = Pos.Bottom (label), Text = "Demonstrating multi-line and word wrap:" };
         app.Add (label);
 
-        foreach (Justification alignment in alignments)
+        foreach (Justification justification in justifications)
         {
-            label = new() { Y = Pos.Bottom (label), Text = $"{alignment}:" };
+            label = new() { Y = Pos.Bottom (label), Text = $"{justification}:" };
             app.Add (label);
-            multipleLines [(int)alignment].Y = Pos.Bottom (label);
-            app.Add (multipleLines [(int)alignment]);
-            label = multipleLines [(int)alignment];
+            multipleLines [(int)justification].Y = Pos.Bottom (label);
+            app.Add (multipleLines [(int)justification]);
+            label = multipleLines [(int)justification];
         }
 
         unicodeCheckBox.Toggled += (s, e) =>
                                    {
-                                       foreach (Justification alignment in alignments)
+                                       foreach (Justification justification in justifications)
                                        {
-                                           singleLines [(int)alignment].Text = e.OldValue == true ? text : unicode;
-                                           multipleLines [(int)alignment].Text = e.OldValue == true ? text : unicode;
+                                           singleLines [(int)justification].Text = e.OldValue == true ? text : unicode;
+                                           multipleLines [(int)justification].Text = e.OldValue == true ? text : unicode;
                                        }
                                    };
 

+ 1 - 1
UICatalog/Scenarios/Unicode.cs

@@ -133,7 +133,7 @@ public class UnicodeInMenu : Scenario
             Width = Dim.Percent (50),
             Height = 1,
             Justification = Justification.Right,
-            Text = $"Align Right - {gitString}"
+            Text = $"Justify Right - {gitString}"
         };
         Win.Add (checkBox, checkBoxRight);
 

+ 8 - 8
UnitTests/Dialogs/DialogTests.cs

@@ -129,7 +129,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonAlignment_Four ()
+    public void ButtonJustification_Four ()
     {
         RunState runstate = null;
 
@@ -219,7 +219,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonAlignment_Four_On_Too_Small_Width ()
+    public void ButtonJustification_Four_On_Too_Small_Width ()
     {
         RunState runstate = null;
 
@@ -312,7 +312,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonAlignment_Four_WideOdd ()
+    public void ButtonJustification_Four_WideOdd ()
     {
         RunState runstate = null;
 
@@ -404,7 +404,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonAlignment_Four_Wider ()
+    public void ButtonJustification_Four_Wider ()
     {
         RunState runstate = null;
 
@@ -498,7 +498,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonAlignment_One ()
+    public void ButtonJustification_One ()
     {
         var d = (FakeDriver)Driver;
         RunState runstate = null;
@@ -636,7 +636,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonAlignment_Three ()
+    public void ButtonJustification_Three ()
     {
         RunState runstate = null;
 
@@ -720,7 +720,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonAlignment_Two ()
+    public void ButtonJustification_Two ()
     {
         RunState runstate = null;
 
@@ -798,7 +798,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonAlignment_Two_Hidden ()
+    public void ButtonJustification_Two_Hidden ()
     {
         RunState runstate = null;
         var firstIteration = false;

+ 15 - 218
UnitTests/Text/TextFormatterTests.cs

@@ -219,19 +219,19 @@ public class TextFormatterTests
     [InlineData ("Ð ÑÐ", "Ð Ñ", 3)] // Should not fit
     public void ClipAndJustify_Valid_Centered (string text, string justifiedText, int maxWidth)
     {
-        var align = Justification.Centered;
+        var justify = Justification.Centered;
         var textDirection = TextDirection.LeftRight_TopBottom;
         var tabWidth = 1;
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, align, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
                      );
         int expectedClippedWidth = Math.Min (justifiedText.GetRuneCount (), maxWidth);
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, align, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
                      );
         Assert.True (justifiedText.GetRuneCount () <= maxWidth);
         Assert.True (justifiedText.GetColumns () <= maxWidth);
@@ -277,19 +277,19 @@ public class TextFormatterTests
     [InlineData ("Ð ÑÐ", "Ð Ñ", 3)] // Should not fit
     public void ClipAndJustify_Valid_Justified (string text, string justifiedText, int maxWidth)
     {
-        var align = Justification.Justified;
+        var justify = Justification.Justified;
         var textDirection = TextDirection.LeftRight_TopBottom;
         var tabWidth = 1;
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, align, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
                      );
         int expectedClippedWidth = Math.Min (justifiedText.GetRuneCount (), maxWidth);
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, align, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
                      );
         Assert.True (justifiedText.GetRuneCount () <= maxWidth);
         Assert.True (justifiedText.GetColumns () <= maxWidth);
@@ -328,19 +328,19 @@ public class TextFormatterTests
     [InlineData ("Ð ÑÐ", "Ð Ñ", 3)] // Should not fit
     public void ClipAndJustify_Valid_Left (string text, string justifiedText, int maxWidth)
     {
-        var align = Justification.Left;
+        var justify = Justification.Left;
         var textDirection = TextDirection.LeftRight_BottomTop;
         var tabWidth = 1;
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, align, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
                      );
         int expectedClippedWidth = Math.Min (justifiedText.GetRuneCount (), maxWidth);
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, align, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
                      );
         Assert.True (justifiedText.GetRuneCount () <= maxWidth);
         Assert.True (justifiedText.GetColumns () <= maxWidth);
@@ -377,19 +377,19 @@ public class TextFormatterTests
     [InlineData ("Ð ÑÐ", "Ð Ñ", 3)] // Should not fit
     public void ClipAndJustify_Valid_Right (string text, string justifiedText, int maxWidth)
     {
-        var align = Justification.Right;
+        var justify = Justification.Right;
         var textDirection = TextDirection.LeftRight_BottomTop;
         var tabWidth = 1;
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, align, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
                      );
         int expectedClippedWidth = Math.Min (justifiedText.GetRuneCount (), maxWidth);
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, align, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
                      );
         Assert.True (justifiedText.GetRuneCount () <= maxWidth);
         Assert.True (justifiedText.GetColumns () <= maxWidth);
@@ -2222,176 +2222,6 @@ ssb
 
         Assert.Equal (new Size (expectedWidth, expectedHeight), tf.Size);
     }
-
-    //[Theory]
-    //[InlineData (Justification.Left, false)]
-    //[InlineData (Justification.Centered, true)]
-    //[InlineData (Justification.Right, false)]
-    //[InlineData (Justification.Justified, true)]
-    //public void TestSize_DirectionChange_AutoSize_True_Or_False_Horizontal (
-    //    Justification Justification,
-    //    bool autoSize
-    //)
-    //{
-    //    var tf = new TextFormatter
-    //    {
-    //        Direction = TextDirection.LeftRight_TopBottom, Text = "你你", Alignment = Justification, AutoSize = autoSize
-    //    };
-    //    Assert.Equal (4, tf.Size.Width);
-    //    Assert.Equal (1, tf.Size.Height);
-
-    //    tf.Direction = TextDirection.TopBottom_LeftRight;
-
-    //    if (autoSize/* && Justification != Justification.Justified*/)
-    //    {
-    //        Assert.Equal (2, tf.Size.Width);
-    //        Assert.Equal (2, tf.Size.Height);
-    //    }
-    //    else
-    //    {
-    //        Assert.Equal (4, tf.Size.Width);
-    //        Assert.Equal (1, tf.Size.Height);
-    //    }
-    //}
-
-    //[Theory]
-    //[InlineData (Justification.Top, false)]
-    //[InlineData (Justification.Centered, true)]
-    //[InlineData (Justification.Bottom, false)]
-    //[InlineData (Justification.Justified, true)]
-    //public void TestSize_DirectionChange_AutoSize_True_Or_False_Vertical (
-    //    Justification Justification,
-    //    bool autoSize
-    //)
-    //{
-    //    var tf = new TextFormatter
-    //    {
-    //        Direction = TextDirection.TopBottom_LeftRight,
-    //        Text = "你你",
-    //        VerticalAlignment = Justification,
-    //        AutoSize = autoSize
-    //    };
-    //    Assert.Equal (2, tf.Size.Width);
-    //    Assert.Equal (2, tf.Size.Height);
-
-    //    tf.Direction = TextDirection.LeftRight_TopBottom;
-
-    //    if (autoSize/* && Justification != Justification.Justified*/)
-    //    {
-    //        Assert.Equal (4, tf.Size.Width);
-    //        Assert.Equal (1, tf.Size.Height);
-    //    }
-    //    else
-    //    {
-    //        Assert.Equal (2, tf.Size.Width);
-    //        Assert.Equal (2, tf.Size.Height);
-    //    }
-    //}
-
-    //[Theory]
-    //[InlineData (TextDirection.LeftRight_TopBottom, false)]
-    //[InlineData (TextDirection.LeftRight_TopBottom, true)]
-    //[InlineData (TextDirection.TopBottom_LeftRight, false)]
-    //[InlineData (TextDirection.TopBottom_LeftRight, true)]
-    //public void TestSize_SizeChange_AutoSize_True_Or_False (TextDirection textDirection, bool autoSize)
-    //{
-    //    var tf = new TextFormatter { Direction = textDirection, Text = "你你", AutoSize = autoSize };
-
-    //    if (textDirection == TextDirection.LeftRight_TopBottom)
-    //    {
-    //        Assert.Equal (4, tf.Size.Width);
-    //        Assert.Equal (1, tf.Size.Height);
-    //    }
-    //    else
-    //    {
-    //        Assert.Equal (2, tf.Size.Width);
-    //        Assert.Equal (2, tf.Size.Height);
-    //    }
-
-    //    tf.Size = new (1, 1);
-
-    //    if (autoSize)
-    //    {
-    //        if (textDirection == TextDirection.LeftRight_TopBottom)
-    //        {
-    //            Assert.Equal (4, tf.Size.Width);
-    //            Assert.Equal (1, tf.Size.Height);
-    //        }
-    //        else
-    //        {
-    //            Assert.Equal (2, tf.Size.Width);
-    //            Assert.Equal (2, tf.Size.Height);
-    //        }
-    //    }
-    //    else
-    //    {
-    //        Assert.Equal (1, tf.Size.Width);
-    //        Assert.Equal (1, tf.Size.Height);
-    //    }
-    //}
-
-    //[Theory]
-    //[InlineData (Justification.Left, false)]
-    //[InlineData (Justification.Centered, true)]
-    //[InlineData (Justification.Right, false)]
-    //[InlineData (Justification.Justified, true)]
-    //public void TestSize_SizeChange_AutoSize_True_Or_False_Horizontal (Justification Justification, bool autoSize)
-    //{
-    //    var tf = new TextFormatter
-    //    {
-    //        Direction = TextDirection.LeftRight_TopBottom, Text = "你你", Alignment = Justification, AutoSize = autoSize
-    //    };
-    //    Assert.Equal (4, tf.Size.Width);
-    //    Assert.Equal (1, tf.Size.Height);
-
-    //    tf.Size = new (1, 1);
-
-    //    if (autoSize)
-    //    {
-    //        Assert.Equal (4, tf.Size.Width);
-    //        Assert.Equal (1, tf.Size.Height);
-    //    }
-    //    else
-    //    {
-    //        Assert.Equal (1, tf.Size.Width);
-    //        Assert.Equal (1, tf.Size.Height);
-    //    }
-    //}
-
-    //[Theory]
-    //[InlineData (Justification.Top, false)]
-    //[InlineData (Justification.Centered, true)]
-    //[InlineData (Justification.Bottom, false)]
-    //[InlineData (Justification.Justified, true)]
-    //public void TestSize_SizeChange_AutoSize_True_Or_False_Vertical (
-    //    Justification Justification,
-    //    bool autoSize
-    //)
-    //{
-    //    var tf = new TextFormatter
-    //    {
-    //        Direction = TextDirection.TopBottom_LeftRight,
-    //        Text = "你你",
-    //        VerticalAlignment = Justification,
-    //        AutoSize = autoSize
-    //    };
-    //    Assert.Equal (2, tf.Size.Width);
-    //    Assert.Equal (2, tf.Size.Height);
-
-    //    tf.Size = new (1, 1);
-
-    //    if (autoSize)
-    //    {
-    //        Assert.Equal (2, tf.Size.Width);
-    //        Assert.Equal (2, tf.Size.Height);
-    //    }
-    //    else
-    //    {
-    //        Assert.Equal (1, tf.Size.Width);
-    //        Assert.Equal (1, tf.Size.Height);
-    //    }
-    //}
-
     [Theory]
     [InlineData ("你", TextDirection.LeftRight_TopBottom, false, 0, 0)]
     [InlineData ("你", TextDirection.LeftRight_TopBottom, true, 2, 1)]
@@ -2408,39 +2238,6 @@ ssb
         Assert.Equal (new Size (expectedWidth, expectedHeight), tf.Size);
     }
 
-    //[Theory]
-    //[InlineData (TextDirection.LeftRight_TopBottom, false)]
-    //[InlineData (TextDirection.LeftRight_TopBottom, true)]
-    //[InlineData (TextDirection.TopBottom_LeftRight, false)]
-    //[InlineData (TextDirection.TopBottom_LeftRight, true)]
-    //public void TestSize_TextChange (TextDirection textDirection, bool autoSize)
-    //{
-    //    var tf = new TextFormatter { Direction = textDirection, Text = "你", AutoSize = autoSize };
-    //    Assert.Equal (new Size (2, 1), tf.Size);
-    //    tf.Text = "你你";
-
-    //    Assert.Equal (autoSize, tf.AutoSize);
-
-    //    if (autoSize)
-    //    {
-    //        if (textDirection == TextDirection.LeftRight_TopBottom)
-    //        {
-    //            Assert.Equal (4, tf.Size.Width);
-    //            Assert.Equal (1, tf.Size.Height);
-    //        }
-    //        else
-    //        {
-    //            Assert.Equal (2, tf.Size.Width);
-    //            Assert.Equal (2, tf.Size.Height);
-    //        }
-    //    }
-    //    else
-    //    {
-    //        Assert.Equal (2, tf.Size.Width);
-    //        Assert.Equal (1, tf.Size.Height);
-    //    }
-    //}
-
     [Fact]
     public void WordWrap_BigWidth ()
     {
@@ -6235,12 +6032,12 @@ B")]
  ******
 0******")]
 
-    public void Draw_Text_Alignment (string text, Justification horizontalTextAlignment, Justification Justification, TextDirection textDirection, string expectedText)
+    public void Draw_Text_Justification (string text, Justification horizontalTextJustification, Justification justification, TextDirection textDirection, string expectedText)
     {
         TextFormatter tf = new ()
         {
-            Justification = horizontalTextAlignment,
-            VerticalJustification = Justification,
+            Justification = horizontalTextJustification,
+            VerticalJustification = justification,
             Direction = textDirection,
             Size = new (7, 7),
             Text = text

+ 1 - 1
UnitTests/View/DrawTests.cs

@@ -332,7 +332,7 @@ public class DrawTests (ITestOutputHelper _output)
     [Fact]
     [AutoInitShutdown]
     [Trait ("Category", "Output")]
-    public void Colors_On_TextAlignment_Right_And_Bottom ()
+    public void Colors_On_TextJustification_Right_And_Bottom ()
     {
         var viewRight = new View
         {

+ 2 - 2
UnitTests/View/Text/AutoSizeTrueTests.cs

@@ -1788,7 +1788,7 @@ Y
     [AutoInitShutdown]
     [InlineData (true)]
     [InlineData (false)]
-    public void View_Draw_Horizontal_Simple_TextAlignments (bool autoSize)
+    public void View_Draw_Horizontal_Simple_TextJustifications (bool autoSize)
     {
         var text = "Hello World";
         var width = 20;
@@ -1912,7 +1912,7 @@ Y
     [AutoInitShutdown]
     [InlineData (true)]
     [InlineData (false)]
-    public void View_Draw_Vertical_Simple_TextAlignments (bool autoSize)
+    public void View_Draw_Vertical_Simple_TextJustifications (bool autoSize)
     {
         var text = "Hello World";
         var height = 20;

+ 4 - 4
UnitTests/Views/CheckBoxTests.cs

@@ -244,7 +244,7 @@ public class CheckBoxTests
 
     [Fact]
     [AutoInitShutdown]
-    public void TextAlignment_Centered ()
+    public void TextJustification_Centered ()
     {
         var checkBox = new CheckBox
         {
@@ -294,7 +294,7 @@ public class CheckBoxTests
 
     [Fact]
     [AutoInitShutdown]
-    public void TextAlignment_Justified ()
+    public void TextJustification_Justified ()
     {
         var checkBox1 = new CheckBox
         {
@@ -361,7 +361,7 @@ public class CheckBoxTests
 
     [Fact]
     [AutoInitShutdown]
-    public void TextAlignment_Left ()
+    public void TextJustification_Left ()
     {
         var checkBox = new CheckBox
         {
@@ -410,7 +410,7 @@ public class CheckBoxTests
 
     [Fact]
     [AutoInitShutdown]
-    public void TextAlignment_Right ()
+    public void TextJustification_Right ()
     {
         var checkBox = new CheckBox
         {