コード例 #1
0
 public void IsNotEmptyWithParam()
 {
     Assert.Throws <ArgumentException>(() => ArgumentCheck.IsNotEmpty(string.Empty, "param"));
     Assert.Throws <ArgumentException>(() => ArgumentCheck.IsNotEmpty("", "param"));
     Assert.DoesNotThrow(() => ArgumentCheck.IsNotEmpty(null, "param"));
     Assert.DoesNotThrow(() => ArgumentCheck.IsNotEmpty("this is a test", "param"));
 }
コード例 #2
0
 public void IsNotEmpty()
 {
     Assert.Throws <ArgumentException>(() => ArgumentCheck.IsNotEmpty(string.Empty));
     Assert.Throws <ArgumentException>(() => ArgumentCheck.IsNotEmpty(""));
     Assert.DoesNotThrow(() => ArgumentCheck.IsNotEmpty(null));
     Assert.DoesNotThrow(() => ArgumentCheck.IsNotEmpty("this is a test"));
 }