Falcon.SugarApi/Falcon.SugarApi.Test/StringExtendTest.cs

26 lines
666 B
C#
Raw Normal View History

using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Falcon.SugarApi;
namespace Falcon.SugarApi.Test
{
[TestClass]
public class StringExtendTest
{
[TestMethod]
public void TestSplit() {
var str = $"a,b.c;de。fg";
var strArr = str.SplitStr();
Assert.AreEqual(7, strArr.Length, "分割后长度应该为7");
str = null;
strArr = str.SplitStr();
Assert.IsNotNull(strArr);
Assert.AreEqual(0, strArr.Length);
}
}
}