From: Paul H. <pha...@us...> - 2005-03-01 16:25:39
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/UtilityTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5548/nhibernate/src/NHibernate.Test/UtilityTest Modified Files: StringHelperFixture.cs Log Message: Various refactorings on the way to 2.1 querying capability Index: StringHelperFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/UtilityTest/StringHelperFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StringHelperFixture.cs 12 Apr 2004 05:38:20 -0000 1.1 --- StringHelperFixture.cs 1 Mar 2005 16:24:42 -0000 1.2 *************** *** 30,33 **** --- 30,76 ---- Assert.AreEqual(expected, StringHelper.GetClassname(typeName)); } + + [Test] + public void CountUnquotedParams() + { + // Base case, no values + Assert.AreEqual(0, StringHelper.CountUnquoted("abcd eftf", '?')); + + // Simple case + Assert.AreEqual(1, StringHelper.CountUnquoted("abcd ? eftf", '?')); + + // Multiple values + Assert.AreEqual(2, StringHelper.CountUnquoted("abcd ? ef ? tf", '?')); + + // Quoted values + Assert.AreEqual(1, StringHelper.CountUnquoted("abcd ? ef '?' tf", '?')); + } + + [Test, ExpectedException(typeof(ArgumentOutOfRangeException))] + /// <summary> + /// Try to locate single quotes which isn't allowed + /// </summary> + public void CantCountQuotes() + { + Assert.AreEqual(0, StringHelper.CountUnquoted("abcd eftf", StringHelper.SingleQuote)); + } + + [Test] + [Ignore("Test not written yet.")] + /// <summary> + /// Qualify a name with a prefix + /// </summary> + public void Qualify() + { + } + + [Test] + [Ignore("Test not written yet.")] + /// <summary> + /// Qualify an array of names with a prefix + /// </summary> + public void QualifyArray() + { + } } } |