public void TestDisplayCount() { string v; int n; n = 0; v = SqlConvert.DisplayCount(n, "Aucun", "Un seul", "{0} valeurs"); AssertAreEqual(v, "Aucun", "DisplaCount 1"); n = 1; v = SqlConvert.DisplayCount(n, "Aucun", "Un seul", "{0} valeurs"); AssertAreEqual(v, "Un seul", "DisplaCount 2"); n = 2; v = SqlConvert.DisplayCount(n, "Aucun", "Un seul", "{0} valeurs"); AssertAreEqual(v, "2 valeurs", "DisplaCount 3"); n = 156; v = SqlConvert.DisplayCount(n, "Aucun", "Un seul", "{0} valeurs"); AssertAreEqual(v, "156 valeurs", "DisplaCount 4"); n = -1; v = SqlConvert.DisplayCount(n, "Aucun", "Un seul", "{0} valeurs"); AssertAreEqual(v, "-1 valeurs", "DisplaCount 5"); n = -2; v = SqlConvert.DisplayCount(n, "Aucun", "Un seul", "{0} valeurs"); AssertAreEqual(v, "-2 valeurs", "DisplaCount 6"); n = 2; v = SqlConvert.DisplayCount(n, "Aucun", "Un seul", "Coucou"); AssertAreEqual(v, "Coucou", "DisplaCount 7"); }