From: Gert D. <dri...@us...> - 2008-04-16 09:47:44
|
Update of /cvsroot/nant/nant/tests/NAnt.Core/Tasks In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18494 Modified Files: PropertyTest.cs Log Message: Fixed test for framework that can be initialized, but is not valid. Index: PropertyTest.cs =================================================================== RCS file: /cvsroot/nant/nant/tests/NAnt.Core/Tasks/PropertyTest.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PropertyTest.cs 17 Dec 2007 13:13:07 -0000 1.13 --- PropertyTest.cs 16 Apr 2008 09:47:44 -0000 1.14 *************** *** 232,236 **** if (invalid == null) { ! Assert.Ignore("Tests requires at least one invalid framework."); } --- 232,236 ---- if (invalid == null) { ! Assert.Ignore("Test requires at least one invalid framework."); } *************** *** 245,258 **** Assert.IsNotNull(ex.InnerException, "#2"); ! string expectedError = string.Format("Failed to initialize " + ! "the '{0}' ({1}) target framework.", invalid.Description, ! invalid.Name); ! BuildException inner = ex.InnerException as BuildException; Assert.IsNotNull(inner, "#3"); Assert.IsNotNull(inner.InnerException, "#4"); Assert.IsNotNull(inner.RawMessage, "#5"); - Assert.IsTrue(inner.RawMessage.StartsWith(expectedError), - "#6:" + inner.RawMessage); } } --- 245,254 ---- Assert.IsNotNull(ex.InnerException, "#2"); ! // either initialization of the framework failed, or validation ! // failed BuildException inner = ex.InnerException as BuildException; Assert.IsNotNull(inner, "#3"); Assert.IsNotNull(inner.InnerException, "#4"); Assert.IsNotNull(inner.RawMessage, "#5"); } } |