0
0
RhSolutions-Api/RhSolutions.Api.Tests/SkuExtensionsTest.cs

25 lines
754 B
C#
Raw Normal View History

2022-12-14 09:53:10 +03:00
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());
}
}
}