2019-12-27 16:07:40 +08:00
|
|
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
|
|
2019-12-31 13:52:29 +08:00
|
|
|
|
namespace Falcon.Extend.Tests
|
2019-12-27 16:07:40 +08:00
|
|
|
|
{
|
|
|
|
|
[TestClass()]
|
|
|
|
|
public class StringExtendTests
|
|
|
|
|
{
|
|
|
|
|
[TestMethod()]
|
|
|
|
|
public void IsNullOrEmptyTest() {
|
|
|
|
|
string str = null;
|
|
|
|
|
Assert.IsTrue(str.IsNullOrEmpty());
|
|
|
|
|
Assert.IsFalse(str.IsNotNullOrEmpty());
|
|
|
|
|
str = "";
|
|
|
|
|
Assert.IsTrue(str.IsNullOrEmpty());
|
|
|
|
|
Assert.IsFalse(str.IsNotNullOrEmpty());
|
|
|
|
|
str = string.Empty;
|
|
|
|
|
Assert.IsTrue(str.IsNullOrEmpty());
|
|
|
|
|
Assert.IsFalse(str.IsNotNullOrEmpty());
|
|
|
|
|
str = "abc";
|
|
|
|
|
Assert.IsFalse(str.IsNullOrEmpty());
|
|
|
|
|
Assert.IsTrue(str.IsNotNullOrEmpty());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|