Beispiel #1
0
 public void WhenSomeValuesAreNullOrEmpty()
 {
     Assert.Throws <DbcException>(() => Dbc.NotNullOrEmpty(new string[] { "", "foo" }));
     Assert.Throws <DbcException>(() => Dbc.NotNullOrEmpty(new string[] { "foo", null }));
 }
Beispiel #2
0
 public void WhenACollectionIsNotEmpty()
 {
     Assert.DoesNotThrow(() => Dbc.NotNullOrEmpty(new int[] { 1 }, "some message"));
 }
Beispiel #3
0
 public void WhenAValueIsNotEmpty()
 {
     Assert.DoesNotThrow(() => Dbc.NotNullOrEmpty("foo", "some message"));
 }
Beispiel #4
0
 public void WhenAValueIsEmptyCollection()
 {
     Assert.Throws <DbcException>(() => Dbc.NotNullOrEmpty(new List <int>()));
     Assert.Throws <DbcException>(() => Dbc.NotNullOrEmpty(new int[] {}));
 }
Beispiel #5
0
 public void WhenAValueIsEmptyString()
 {
     Assert.Throws <DbcException>(() => Dbc.NotNullOrEmpty(""));
 }
Beispiel #6
0
 public void WhenAValueIsNull()
 {
     Assert.Throws <DbcException>(() => Dbc.NotNullOrEmpty((string)null));
 }