public void NotEmptyTest() { string actual = "afds"; SAssert.NotEmpty(actual); SAssert.NotEmpty(null); XAssert.Throws <ArgumentException>(() => SAssert.NotEmpty(string.Empty)); }
public void EmptyArrayTest() { int[] a = new int[] { 1, 2, 3 }; int[] b = new int[] { }; SAssert.NotEmpty(a); XAssert.Throws <ArgumentException>(() => SAssert.NotEmpty(b)); SAssert.Empty(b); XAssert.Throws <ArgumentException>(() => SAssert.Empty(a)); }
public void EmptyListTest() { List <string> a = new List <string>(); a.Add("foo"); List <string> b = new List <string>(); SAssert.NotEmpty(a); XAssert.Throws <ArgumentException>(() => SAssert.NotEmpty(b)); SAssert.Empty(b); XAssert.Throws <ArgumentException>(() => SAssert.Empty(a)); }
public void EmptyDictionaryTest() { Dictionary <string, string> a = new Dictionary <string, string>(); a.Add("foo", "bar"); Dictionary <string, string> b = new Dictionary <string, string>(); SAssert.NotEmpty(a); XAssert.Throws <ArgumentException>(() => SAssert.NotEmpty(b)); SAssert.Empty(b); XAssert.Throws <ArgumentException>(() => SAssert.Empty(a)); }