Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuarezruiz committed Mar 11, 2021
1 parent 20ff973 commit 3c62e74
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Core/src/Handlers/Label/LabelHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ public partial class LabelHandler
[nameof(ILabel.Text)] = MapText,
[nameof(ILabel.CharacterSpacing)] = MapCharacterSpacing,
[nameof(ILabel.Font)] = MapFont,
[nameof(ILabel.Padding)] = MapPadding,
[nameof(ILabel.LineBreakMode)] = MapLineBreakMode,
[nameof(ILabel.Padding)] = MapPadding
};

public LabelHandler() : base(LabelMapper)
Expand Down
3 changes: 0 additions & 3 deletions src/Core/tests/DeviceTests/AssertionExtensions.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Android.Graphics;
using Android.Views;
using Android.Widget;
using Xunit;
using AColor = Android.Graphics.Color;
using AView = Android.Views.View;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public async Task FontFamilyInitializesCorrectly(string family)
Assert.NotEqual(fontManager.DefaultTypeface, nativeLabel.Typeface);
}

[Fact]
[Fact(DisplayName = "Negative MaxLines value with wrap is correct")]
public async Task NegativeMaxValueWithWrapIsCorrect()
{
var label = new LabelStub()
Expand All @@ -53,7 +53,7 @@ public async Task NegativeMaxValueWithWrapIsCorrect()
Assert.Equal(int.MaxValue, nativeValue);
}

[Fact]
[Fact(DisplayName = "Padding Initializes Correctly")]
public async Task PaddingInitializesCorrectly()
{
var label = new LabelStub()
Expand Down
12 changes: 6 additions & 6 deletions src/Core/tests/DeviceTests/Handlers/Label/LabelHandlerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ public async Task LineBreakModeInitializesCorrectly()
Assert.Equal(expectedValue, values.NativeViewValue);
}

[Fact]
public async Task LineBreakModeDoesNotAffectMaxLines()
[Fact(DisplayName = "LineBreakMode does not affect to MaxLines")]
public async Task LineBreakModeDoesNotAffectMaxLines()
{
var label = new LabelStub()
{
Expand All @@ -200,8 +200,8 @@ await InvokeOnMainThreadAsync(() =>
});
}

[Fact]
public async Task SingleLineBreakModeChangesMaxLines()
[Fact(DisplayName = "Single LineBreakMode changes MaxLines")]
public async Task SingleLineBreakModeChangesMaxLines()
{
var label = new LabelStub()
{
Expand All @@ -226,8 +226,8 @@ await InvokeOnMainThreadAsync(() =>
});
}

[Theory]
[InlineData(LineBreakMode.HeadTruncation)]
[Theory(DisplayName = "Unsetting single LineBreakMode resets MaxLines")]
[InlineData(LineBreakMode.HeadTruncation)]
[InlineData(LineBreakMode.NoWrap)]
public async Task UnsettingSingleLineBreakModeResetsMaxLines(LineBreakMode newMode)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public async Task FontFamilyInitializesCorrectly(string family)
Assert.NotEqual(fontManager.DefaultFont.FamilyName, nativeFont.FamilyName);
}

[Fact]
[Fact(DisplayName = "Negative MaxLines value with wrap is correct")]
public async Task NegativeMaxValueWithWrapIsCorrect()
{
var label = new LabelStub()
Expand All @@ -51,7 +51,7 @@ public async Task NegativeMaxValueWithWrapIsCorrect()
Assert.Equal(0, nativeValue);
}

[Fact]
[Fact(DisplayName = "Padding Initializes Correctly")]
public async Task PaddingInitializesCorrectly()
{
var label = new LabelStub()
Expand Down

0 comments on commit 3c62e74

Please sign in to comment.