forked from xamarin/Xamarin.Forms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTextDecorationUnitTests.cs
23 lines (21 loc) · 973 Bytes
/
TextDecorationUnitTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using NUnit.Framework;
namespace Xamarin.Forms.Core.UnitTests
{
[TestFixture]
public class TextDecorationUnitTests : BaseTestFixture
{
[TestCase("strikethrough", TextDecorations.Strikethrough)]
[TestCase("underline", TextDecorations.Underline)]
[TestCase("line-through", TextDecorations.Strikethrough)]
[TestCase("none", TextDecorations.None)]
[TestCase("strikethrough underline", TextDecorations.Underline | TextDecorations.Strikethrough)]
[TestCase("underline strikethrough", TextDecorations.Underline | TextDecorations.Strikethrough)]
[TestCase("underline line-through", TextDecorations.Underline | TextDecorations.Strikethrough)]
[TestCase("line-through underline", TextDecorations.Underline | TextDecorations.Strikethrough)]
public void TestTextDecorationConverter(string input, TextDecorations expected)
{
var converter = new TextDecorationConverter();
Assert.AreEqual(converter.ConvertFromInvariantString(input), expected);
}
}
}