Falcon.Extend/Falcon.ExtendTests/StringExtendTests.cs

24 lines
762 B
C#
Raw Permalink Normal View History

using Microsoft.VisualStudio.TestTools.UnitTesting;
2019-12-31 13:52:29 +08:00
namespace Falcon.Extend.Tests
{
[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());
}
}
}