From: Jeff R. <jef...@us...> - 2005-10-23 23:39:47
|
Update of /cvsroot/svgdomcsharp/SharpVectorGraphics/src/SharpVectorCss/SharpVectors/Dom/Css In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18901/src/SharpVectorCss/SharpVectors/Dom/Css Modified Files: CssTests.cs RgbColor.cs XPathSelector.cs Log Message: Library wide fixes for Unit Test completion, only Mutation events left to implement for current test coverage Index: XPathSelector.cs =================================================================== RCS file: /cvsroot/svgdomcsharp/SharpVectorGraphics/src/SharpVectorCss/SharpVectors/Dom/Css/XPathSelector.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- XPathSelector.cs 28 Jun 2003 20:37:30 -0000 1.5 +++ XPathSelector.cs 23 Oct 2005 23:39:29 -0000 1.6 @@ -672,7 +672,7 @@ } [Test] - [Ignore("DTD support disabled")] + [Ignore("This test will fail if run because we are searching for id nodes based on attribute name, not DTD ID type")] public void TestIdMatchingNoDtd() { // id on <b> is not defined in the DTD as ID @@ -786,7 +786,6 @@ public void TestTargetMatching() { Console.WriteLine(doc.Url); - } */ @@ -929,7 +928,6 @@ { XPathSelector xsel = new XPathSelector(sel, nsTable); xsel.Matches(e); - // Console.WriteLine(xsel.XPath); } } Index: CssTests.cs =================================================================== RCS file: /cvsroot/svgdomcsharp/SharpVectorGraphics/src/SharpVectorCss/SharpVectors/Dom/Css/CssTests.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CssTests.cs 28 Jun 2003 21:50:03 -0000 1.1 +++ CssTests.cs 23 Oct 2005 23:39:29 -0000 1.2 @@ -63,7 +63,7 @@ [Test] public void TestCssStyleRule() { - rule = (CssStyleRule)cssStyleSheet.CssRules[0]; + rule = (CssStyleRule)cssStyleSheet.CssRules[0]; Assertion.AssertNull(rule.ParentRule); Assertion.AssertEquals("g", rule.SelectorText); Assertion.AssertEquals("g{fill:#123456 !important;opacity:0.5;}", rule.CssText); @@ -75,14 +75,15 @@ [Test] public void TestCssStyleDeclaration() { - CssStyleDeclaration csd = (CssStyleDeclaration)rule.Style; - Assertion.AssertEquals("fill:#123456 !important;opacity:0.5;", csd.CssText); - Assertion.AssertEquals(2, csd.Length); - Assertion.AssertSame(rule, csd.ParentRule); - Assertion.AssertEquals("important", csd.GetPropertyPriority("fill")); - Assertion.AssertEquals("0.5", csd.GetPropertyValue("opacity")); - Assertion.AssertEquals("", csd.GetPropertyPriority("opacity")); - Assertion.AssertEquals("#123456", csd.GetPropertyValue("fill")); + rule = (CssStyleRule)cssStyleSheet.CssRules[0]; + CssStyleDeclaration csd = (CssStyleDeclaration)rule.Style; + Assertion.AssertEquals("fill:#123456 !important;opacity:0.5;", csd.CssText); + Assertion.AssertEquals(2, csd.Length); + Assertion.AssertSame(rule, csd.ParentRule); + Assertion.AssertEquals("important", csd.GetPropertyPriority("fill")); + Assertion.AssertEquals("0.5", csd.GetPropertyValue("opacity")); + Assertion.AssertEquals("", csd.GetPropertyPriority("opacity")); + Assertion.AssertEquals("#123456", csd.GetPropertyValue("fill")); csd.SetProperty("opacity", "0.8", ""); Assertion.AssertEquals("0.8", csd.GetPropertyValue("opacity")); Index: RgbColor.cs =================================================================== RCS file: /cvsroot/svgdomcsharp/SharpVectorGraphics/src/SharpVectorCss/SharpVectors/Dom/Css/RgbColor.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- RgbColor.cs 6 Mar 2005 08:07:04 -0000 1.1 +++ RgbColor.cs 23 Oct 2005 23:39:29 -0000 1.2 @@ -169,10 +169,11 @@ #region Unit tests #if TEST - [TestFixture] + [TestFixture] public class RgbColorTests { RgbColor color; + [Test] public void TestAbsoluteRgb() { color = new RgbColor("rgb( 100 , 123,15)"); |