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