25 lines
754 B
C#
25 lines
754 B
C#
|
using RhSolutions.Api.Models;
|
||
|
|
||
|
namespace RhSolutions.Tests
|
||
|
{
|
||
|
public class SkuExtensionsTests
|
||
|
{
|
||
|
[Theory]
|
||
|
[InlineData("11600011001")]
|
||
|
[InlineData(" 11600011001")]
|
||
|
[InlineData("11600011001 ")]
|
||
|
[InlineData("string 11600011001")]
|
||
|
[InlineData("11600011001 string")]
|
||
|
[InlineData("160001-001")]
|
||
|
[InlineData("string 160001-001")]
|
||
|
[InlineData("160001-001 string")]
|
||
|
[InlineData("160001001")]
|
||
|
[InlineData("string 160001001")]
|
||
|
[InlineData("160001001 string")]
|
||
|
public void TestName(string input)
|
||
|
{
|
||
|
Sku.TryParse(input, out IEnumerable<Sku> sku);
|
||
|
Assert.Equal(new Sku("160001", "001"), sku.FirstOrDefault());
|
||
|
}
|
||
|
}
|
||
|
}
|