ArgumentHasLength() 공개 정적인 메소드

Checks the value of the supplied ICollection argument and throws an ArgumentNullException if it is or contains no elements.
/// If the supplied is or /// contains no elements. ///
public static ArgumentHasLength ( ICollection argument, string name ) : void
argument ICollection The array or collection to check.
name string The argument name.
리턴 void
 public void ArgumentHasLengthArgumentHasElementsWithMessage()
 {
     AssertUtils.ArgumentHasLength(new byte[1], "foo", "Bang!");
 }
 public void ArgumentHasLengthArgumentIsEmptyWithMessage()
 {
     Assert.Throws <ArgumentNullException>(() => AssertUtils.ArgumentHasLength(new byte[0], "foo", "Bang!"));
 }
 public void ArgumentHasLengthArgumentHasElements()
 {
     AssertUtils.ArgumentHasLength(new byte[1], "foo");
 }
 public void ArgumentHasLengthArgumentIsNull()
 {
     Assert.Throws <ArgumentNullException>(() => AssertUtils.ArgumentHasLength(null, "foo"));
 }
예제 #5
0
 public void ArgumentHasLengthArgumentIsEmptyWithMessage()
 {
     AssertUtils.ArgumentHasLength(new byte[0], "foo", "Bang!");
 }
예제 #6
0
 public void ArgumentHasLengthArgumentIsEmpty()
 {
     AssertUtils.ArgumentHasLength(new byte[0], "foo");
 }
예제 #7
0
 public void ArgumentHasLengthArgumentIsNullWithMessage()
 {
     AssertUtils.ArgumentHasLength(null, "foo", "Bang!");
 }
예제 #8
0
 public void ArgumentHasLengthArgumentIsNull()
 {
     AssertUtils.ArgumentHasLength(null, "foo");
 }