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