You can subscribe to this list here.
2004 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(10) |
Aug
(8) |
Sep
|
Oct
(13) |
Nov
(50) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
|
Mar
(10) |
Apr
(12) |
May
(3) |
Jun
(6) |
Jul
(3) |
Aug
(1) |
Sep
(49) |
Oct
|
Nov
|
Dec
(3) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(6) |
Dec
(11) |
2007 |
Jan
(1) |
Feb
(6) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
2008 |
Jan
(5) |
Feb
(6) |
Mar
(25) |
Apr
(8) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Owen R. <exo...@us...> - 2004-11-15 05:01:19
|
Update of /cvsroot/netreflector/NetReflector/tools/fxcop/Engines/Introspection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1036/Introspection Log Message: Directory /cvsroot/netreflector/NetReflector/tools/fxcop/Engines/Introspection added to the repository |
From: Owen R. <exo...@us...> - 2004-11-15 05:00:48
|
Update of /cvsroot/netreflector/NetReflector/tools/fxcop/Xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv860/Xml Log Message: Directory /cvsroot/netreflector/NetReflector/tools/fxcop/Xml added to the repository |
From: Owen R. <exo...@us...> - 2004-11-15 05:00:47
|
Update of /cvsroot/netreflector/NetReflector/tools/fxcop/Rules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv860/Rules Log Message: Directory /cvsroot/netreflector/NetReflector/tools/fxcop/Rules added to the repository |
From: Owen R. <exo...@us...> - 2004-11-15 05:00:47
|
Update of /cvsroot/netreflector/NetReflector/tools/fxcop/Repository In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv860/Repository Log Message: Directory /cvsroot/netreflector/NetReflector/tools/fxcop/Repository added to the repository |
From: Owen R. <exo...@us...> - 2004-11-15 05:00:46
|
Update of /cvsroot/netreflector/NetReflector/tools/fxcop/Engines In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv860/Engines Log Message: Directory /cvsroot/netreflector/NetReflector/tools/fxcop/Engines added to the repository |
From: Owen R. <exo...@us...> - 2004-11-15 05:00:29
|
Update of /cvsroot/netreflector/NetReflector/tools/fxcop In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv811/fxcop Log Message: Directory /cvsroot/netreflector/NetReflector/tools/fxcop added to the repository |
From: Owen R. <exo...@us...> - 2004-11-15 05:00:29
|
Update of /cvsroot/netreflector/NetReflector/tools/nant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv811/nant Log Message: Directory /cvsroot/netreflector/NetReflector/tools/nant added to the repository |
From: Owen R. <exo...@us...> - 2004-11-15 04:59:23
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Generators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv541/Generators Log Message: Directory /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Generators added to the repository |
From: Owen R. <exo...@us...> - 2004-10-29 09:20:45
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector/Generators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22099/Generators Log Message: Directory /cvsroot/netreflector/NetReflector/src/NetReflector/Generators added to the repository |
From: Owen R. <exo...@us...> - 2004-10-29 09:20:26
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflectorDocumenterTask In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22059/NetReflectorDocumenterTask Log Message: Directory /cvsroot/netreflector/NetReflector/src/NetReflectorDocumenterTask added to the repository |
From: Owen R. <exo...@us...> - 2004-10-29 09:19:43
|
Update of /cvsroot/netreflector/NetReflector/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21841/tools Log Message: Directory /cvsroot/netreflector/NetReflector/tools added to the repository |
From: Owen R. <exo...@us...> - 2004-10-22 12:45:47
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Serialisers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32655/src/NetReflector.Test/Serialisers Modified Files: XmlArraySerialiserTest.cs XmlCollectionSerialiserTest.cs XmlDictionarySerialiserTest.cs XmlDocumentationGeneratorTest.cs XmlMemberSerialiserTest.cs XmlTypeSerialiserTest.cs Log Message: improved exception handling for loading types from an assembly upgrading to nunit2.2 Index: XmlCollectionSerialiserTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Serialisers/XmlCollectionSerialiserTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XmlCollectionSerialiserTest.cs 5 Nov 2003 08:29:56 -0000 1.1 --- XmlCollectionSerialiserTest.cs 22 Oct 2004 12:45:33 -0000 1.2 *************** *** 1,10 **** using NUnit.Framework; - using System; - using System.Collections; namespace Exortech.NetReflector.Test.Serialisers { [TestFixture] ! public class XmlCollectionSerialiserTest : Assertion { private NetReflectorTypeTable table = NetReflectorTypeTable.CreateDefault(); --- 1,8 ---- using NUnit.Framework; namespace Exortech.NetReflector.Test.Serialisers { [TestFixture] ! public class XmlCollectionSerialiserTest { private NetReflectorTypeTable table = NetReflectorTypeTable.CreateDefault(); *************** *** 14,18 **** { string xml = NetReflector.Write(CollectionTestClass.Create()); ! AssertEquals(CollectionTestClass.GetXml(), xml); } --- 12,16 ---- { string xml = NetReflector.Write(CollectionTestClass.Create()); ! Assert.AreEqual(CollectionTestClass.GetXml(), xml); } Index: XmlTypeSerialiserTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Serialisers/XmlTypeSerialiserTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XmlTypeSerialiserTest.cs 5 Nov 2003 08:29:56 -0000 1.1 --- XmlTypeSerialiserTest.cs 22 Oct 2004 12:45:33 -0000 1.2 *************** *** 1,16 **** using NUnit.Framework; - using System; namespace Exortech.NetReflector.Test.Serialisers { [TestFixture] ! public class XmlTypeSerialiserTest : Assertion { [Test] public void GetReflectorTypeAttribute() { ! ReflectorTypeAttribute attribute = ReflectorTypeAttribute.GetAttribute(typeof(TestClass)); ! AssertNotNull(attribute); ! AssertEquals("reflectTest", attribute.Name); } --- 1,15 ---- using NUnit.Framework; namespace Exortech.NetReflector.Test.Serialisers { [TestFixture] ! public class XmlTypeSerialiserTest { [Test] public void GetReflectorTypeAttribute() { ! ReflectorTypeAttribute attribute = ReflectorTypeAttribute.GetAttribute(typeof (TestClass)); ! Assert.IsNotNull(attribute); ! Assert.AreEqual("reflectTest", attribute.Name); } *************** *** 19,25 **** { // return null if attribute is missing ! ReflectorTypeAttribute attribute = ReflectorTypeAttribute.GetAttribute(typeof(string)); ! AssertNull(attribute); } } ! } --- 18,24 ---- { // return null if attribute is missing ! ReflectorTypeAttribute attribute = ReflectorTypeAttribute.GetAttribute(typeof (string)); ! Assert.IsNull(attribute); } } ! } \ No newline at end of file Index: XmlArraySerialiserTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Serialisers/XmlArraySerialiserTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** XmlArraySerialiserTest.cs 12 Dec 2003 21:30:17 -0000 1.2 --- XmlArraySerialiserTest.cs 22 Oct 2004 12:45:33 -0000 1.3 *************** *** 1,13 **** - using NUnit.Framework; - using System; - using System.Collections; using System.IO; using System.Text; using System.Xml; namespace Exortech.NetReflector.Test.Serialisers { [TestFixture] ! public class XmlArraySerialiserTest : Assertion { private NetReflectorTypeTable table = NetReflectorTypeTable.CreateDefault(); --- 1,11 ---- using System.IO; using System.Text; using System.Xml; + using NUnit.Framework; namespace Exortech.NetReflector.Test.Serialisers { [TestFixture] ! public class XmlArraySerialiserTest { private NetReflectorTypeTable table = NetReflectorTypeTable.CreateDefault(); *************** *** 17,21 **** { string xml = NetReflector.Write(ArrayTestClass.Create()); ! AssertEquals(ArrayTestClass.GetXml(), xml); } --- 15,19 ---- { string xml = NetReflector.Write(ArrayTestClass.Create()); ! Assert.AreEqual(ArrayTestClass.GetXml(), xml); } *************** *** 32,37 **** string xml = ArrayTestClass.GetXml().Replace("2", XmlEncode(@"<foo><![CDATA[bar]]>")); ArrayTestClass actual = (ArrayTestClass)NetReflector.Read(xml, table); ! AssertEquals(@"<foo><![CDATA[bar]]>", actual.StringArray[1]); ! AssertEquals(@"<foo><![CDATA[bar]]>", actual.Elements[1].ID); } --- 30,35 ---- string xml = ArrayTestClass.GetXml().Replace("2", XmlEncode(@"<foo><![CDATA[bar]]>")); ArrayTestClass actual = (ArrayTestClass)NetReflector.Read(xml, table); ! Assert.AreEqual(@"<foo><![CDATA[bar]]>", actual.StringArray[1]); ! Assert.AreEqual(@"<foo><![CDATA[bar]]>", actual.Elements[1].ID); } Index: XmlDictionarySerialiserTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Serialisers/XmlDictionarySerialiserTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XmlDictionarySerialiserTest.cs 5 Nov 2003 08:29:56 -0000 1.1 --- XmlDictionarySerialiserTest.cs 22 Oct 2004 12:45:33 -0000 1.2 *************** *** 1,10 **** using NUnit.Framework; - using System; - using System.Collections; namespace Exortech.NetReflector.Test.Serialisers { [TestFixture] ! public class XmlDictionarySerialiserTest : Assertion { private NetReflectorTypeTable table = NetReflectorTypeTable.CreateDefault(); --- 1,8 ---- using NUnit.Framework; namespace Exortech.NetReflector.Test.Serialisers { [TestFixture] ! public class XmlDictionarySerialiserTest { private NetReflectorTypeTable table = NetReflectorTypeTable.CreateDefault(); *************** *** 14,18 **** { string xml = NetReflector.Write(HashTestClass.CreateHashtableWithElements()); ! AssertEquals(HashTestClass.GetXmlForHashtableWithElements(), xml); } --- 12,16 ---- { string xml = NetReflector.Write(HashTestClass.CreateHashtableWithElements()); ! Assert.AreEqual(HashTestClass.GetXmlForHashtableWithElements(), xml); } *************** *** 21,25 **** { string xml = NetReflector.Write(HashTestClass.CreateHashtableWithStrings()); ! AssertEquals(HashTestClass.GetXmlForHashtableWithStrings(), xml); } --- 19,23 ---- { string xml = NetReflector.Write(HashTestClass.CreateHashtableWithStrings()); ! Assert.AreEqual(HashTestClass.GetXmlForHashtableWithStrings(), xml); } Index: XmlMemberSerialiserTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Serialisers/XmlMemberSerialiserTest.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** XmlMemberSerialiserTest.cs 3 Aug 2004 10:40:41 -0000 1.4 --- XmlMemberSerialiserTest.cs 22 Oct 2004 12:45:33 -0000 1.5 *************** *** 5,9 **** { [TestFixture] ! public class XmlMemberSerialiserTest : Assertion { private NetReflectorTypeTable table = NetReflectorTypeTable.CreateDefault(); --- 5,9 ---- { [TestFixture] ! public class XmlMemberSerialiserTest { private NetReflectorTypeTable table = NetReflectorTypeTable.CreateDefault(); *************** *** 14,18 **** TestInnerClass target = TestInnerClass.Create(); string xml = NetReflector.Write(target); ! AssertEquals(TestInnerClass.GetOuterXml(), xml); } --- 14,18 ---- TestInnerClass target = TestInnerClass.Create(); string xml = NetReflector.Write(target); ! Assert.AreEqual(TestInnerClass.GetOuterXml(), xml); } *************** *** 22,26 **** TestClass target = TestClass.Create(DateTime.Now); string xml = NetReflector.Write(target); ! AssertEquals(TestClass.GetXml(target.DateTime), xml); } --- 22,26 ---- TestClass target = TestClass.Create(DateTime.Now); string xml = NetReflector.Write(target); ! Assert.AreEqual(TestClass.GetXml(target.DateTime), xml); } *************** *** 30,34 **** TestClass target = TestClass.CreateWithSubClass(); string xml = NetReflector.Write(target); ! AssertEquals(TestClass.GetXmlWithSubClass(DateTime.Now), xml); } --- 30,34 ---- TestClass target = TestClass.CreateWithSubClass(); string xml = NetReflector.Write(target); ! Assert.AreEqual(TestClass.GetXmlWithSubClass(DateTime.Now), xml); } *************** *** 41,45 **** string xml = NetReflector.Write(target); ! AssertEquals(TestClass.GetXml(target.DateTime, @"<inner classType=""sub""><subzero>-40</subzero><name><![CDATA[<message/>]]><!foo>&quot;</name><present>here</present></inner>"), xml); } --- 41,45 ---- string xml = NetReflector.Write(target); ! Assert.AreEqual(TestClass.GetXml(target.DateTime, @"<inner classType=""sub""><subzero>-40</subzero><name><![CDATA[<message/>]]><!foo>&quot;</name><present>here</present></inner>"), xml); } *************** *** 78,82 **** string xml = TestClass.GetXml(DateTime.Now, @"<inner classType=""sub""><subzero>-40</subzero><name><![CDATA[<message/>]]><!foo>&quot;</name><present>here</present></inner>"); TestClass testClass = (TestClass)NetReflector.Read(xml, table); ! AssertEquals(@"<![CDATA[<message/>]]><!foo>"", testClass.InnerClass.InnerName); } --- 78,82 ---- string xml = TestClass.GetXml(DateTime.Now, @"<inner classType=""sub""><subzero>-40</subzero><name><![CDATA[<message/>]]><!foo>&quot;</name><present>here</present></inner>"); TestClass testClass = (TestClass)NetReflector.Read(xml, table); ! Assert.AreEqual(@"<![CDATA[<message/>]]><!foo>"", testClass.InnerClass.InnerName); } *************** *** 129,133 **** string serializedForm = NetReflector.Write(target); ! AssertEquals(@"<ignorenonreflectortype />", serializedForm); } } --- 129,133 ---- string serializedForm = NetReflector.Write(target); ! Assert.AreEqual(@"<ignorenonreflectortype />", serializedForm); } } Index: XmlDocumentationGeneratorTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Serialisers/XmlDocumentationGeneratorTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XmlDocumentationGeneratorTest.cs 6 Jul 2004 05:13:20 -0000 1.1 --- XmlDocumentationGeneratorTest.cs 22 Oct 2004 12:45:33 -0000 1.2 *************** *** 1,13 **** - using NUnit.Framework; - using System; using System.IO; - using System.Xml; - using Exortech.NetReflector.Util; using System.Reflection; namespace Exortech.NetReflector.Test.Serialisers { [TestFixture] ! public class XmlDocumentationGeneratorTest : Assertion { [Test] --- 1,11 ---- using System.IO; using System.Reflection; + using System.Xml; + using NUnit.Framework; namespace Exortech.NetReflector.Test.Serialisers { [TestFixture] ! public class XmlDocumentationGeneratorTest { [Test] *************** *** 23,27 **** string expectedXml = @"<type><name>TestClass</name><namespace>Exortech.NetReflector.Test</namespace><reflectorName>reflectTest</reflectorName>" + "<description>Class used for unit testing NetReflector.</description></type>"; ! AssertEquals(expectedXml, writer.ToString()); } --- 21,25 ---- string expectedXml = @"<type><name>TestClass</name><namespace>Exortech.NetReflector.Test</namespace><reflectorName>reflectTest</reflectorName>" + "<description>Class used for unit testing NetReflector.</description></type>"; ! Assert.AreEqual(expectedXml, writer.ToString()); } *************** *** 37,41 **** string expectedXml = @"<type><name>TestSubClass</name><namespace>Exortech.NetReflector.Test</namespace><reflectorName>sub</reflectorName></type>"; ! AssertEquals(expectedXml, writer.ToString()); } --- 35,39 ---- string expectedXml = @"<type><name>TestSubClass</name><namespace>Exortech.NetReflector.Test</namespace><reflectorName>sub</reflectorName></type>"; ! Assert.AreEqual(expectedXml, writer.ToString()); } *************** *** 50,54 **** string expectedXml = @"<members><member><name>Name</name><reflectorName>name</reflectorName><description>name of the test class</description></member>" + "<member><name>Count</name><reflectorName>count</reflectorName></member></members>"; ! AssertEquals(expectedXml, writer.ToString()); } --- 48,52 ---- string expectedXml = @"<members><member><name>Name</name><reflectorName>name</reflectorName><description>name of the test class</description></member>" + "<member><name>Count</name><reflectorName>count</reflectorName></member></members>"; ! Assert.AreEqual(expectedXml, writer.ToString()); } |
From: Owen R. <exo...@us...> - 2004-10-22 12:45:47
|
Update of /cvsroot/netreflector/NetReflector/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32655/lib Modified Files: nunit.framework.dll Log Message: improved exception handling for loading types from an assembly upgrading to nunit2.2 Index: nunit.framework.dll =================================================================== RCS file: /cvsroot/netreflector/NetReflector/lib/nunit.framework.dll,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsvpNMLk and /tmp/cvsaMR7v7 differ |
From: Owen R. <exo...@us...> - 2004-10-22 12:45:47
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32655/src/NetReflector/util Modified Files: StringUtil.cs Log Message: improved exception handling for loading types from an assembly upgrading to nunit2.2 Index: StringUtil.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/util/StringUtil.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** StringUtil.cs 24 Oct 2002 13:29:21 -0000 1.1.1.1 --- StringUtil.cs 22 Oct 2004 12:45:34 -0000 1.2 *************** *** 1,4 **** --- 1,5 ---- using System; using System.Collections; + using System.Text; namespace Exortech.NetReflector.Util *************** *** 10,13 **** --- 11,26 ---- return CaseInsensitiveComparer.Default.Compare(a, b) == 0; } + + public static string Join(string separator, object[] objects) + { + StringBuilder builder = new StringBuilder(); + foreach (object obj in objects) + { + if (obj == null) continue; + if (builder.Length > 0) builder.Append(separator); + builder.Append(obj.ToString()); + } + return builder.ToString(); + } } } |
From: Owen R. <exo...@us...> - 2004-10-22 12:45:46
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32655/src/NetReflector.Test Modified Files: NetReflectorTest.cs NetReflectorTypeTableTest.cs Log Message: improved exception handling for loading types from an assembly upgrading to nunit2.2 Index: NetReflectorTypeTableTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/NetReflectorTypeTableTest.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NetReflectorTypeTableTest.cs 3 Aug 2004 10:40:39 -0000 1.3 --- NetReflectorTypeTableTest.cs 22 Oct 2004 12:45:33 -0000 1.4 *************** *** 1,12 **** - using Exortech.NetReflector; - using NUnit.Framework; using System; ! using System.Reflection.Emit; using System.Reflection; namespace Exortech.NetReflector.Test { [TestFixture] ! public class NetReflectorTypeTableTest : Assertion { [Test] --- 1,12 ---- using System; ! using System.IO; using System.Reflection; + using System.Reflection.Emit; + using NUnit.Framework; namespace Exortech.NetReflector.Test { [TestFixture] ! public class NetReflectorTypeTableTest { [Test] *************** *** 14,21 **** { NetReflectorTypeTable table = new NetReflectorTypeTable(); ! table.Add(typeof(TestClass)); ! AssertEquals(1, table.Count); ! AssertEquals(typeof(TestClass), table["reflectTest"].Type); } --- 14,21 ---- { NetReflectorTypeTable table = new NetReflectorTypeTable(); ! table.Add(typeof (TestClass)); ! Assert.AreEqual(1, table.Count); ! Assert.AreEqual(typeof (TestClass), table["reflectTest"].Type); } *************** *** 26,37 **** table.Add(Assembly.GetExecutingAssembly()); ! AssertEquals(10, table.Count); ! AssertEquals(typeof(TestClass), table["reflectTest"].Type); ! AssertEquals(typeof(TestInnerClass), table["inner"].Type); ! AssertEquals(typeof(TestSubClass), table["sub"].Type); ! AssertEquals(typeof(ArrayTestClass), table["array-test"].Type); ! AssertEquals(typeof(ElementTestClass), table["element"].Type); ! AssertEquals(typeof(HashTestClass), table["hashtest"].Type); ! AssertEquals(typeof(CollectionTestClass), table["collectiontest"].Type); } --- 26,37 ---- table.Add(Assembly.GetExecutingAssembly()); ! Assert.AreEqual(10, table.Count); ! Assert.AreEqual(typeof (TestClass), table["reflectTest"].Type); ! Assert.AreEqual(typeof (TestInnerClass), table["inner"].Type); ! Assert.AreEqual(typeof (TestSubClass), table["sub"].Type); ! Assert.AreEqual(typeof (ArrayTestClass), table["array-test"].Type); ! Assert.AreEqual(typeof (ElementTestClass), table["element"].Type); ! Assert.AreEqual(typeof (HashTestClass), table["hashtest"].Type); ! Assert.AreEqual(typeof (CollectionTestClass), table["collectiontest"].Type); } *************** *** 43,47 **** table.Add(Assembly.GetExecutingAssembly()); ! AssertEquals(10, table.Count); } --- 43,47 ---- table.Add(Assembly.GetExecutingAssembly()); ! Assert.AreEqual(10, table.Count); } *************** *** 51,55 **** NetReflectorTypeTable table = new NetReflectorTypeTable(); table.Add(AppDomain.CurrentDomain); ! Assert(table.Count > 0); } --- 51,55 ---- NetReflectorTypeTable table = new NetReflectorTypeTable(); table.Add(AppDomain.CurrentDomain); ! Assert.IsTrue(table.Count > 0); } *************** *** 59,68 **** NetReflectorTypeTable table = new NetReflectorTypeTable(); table.Add("NetReflectorPlugin.Test.dll"); ! AssertEquals(1, table.Count); ! AssertNotNull("Plugin type not found", table["plugin"]); } ! [Test, ExpectedException(typeof(System.IO.FileNotFoundException))] ! public void TestLoadReflectorTypesByFilename_UnknownAssembly() { NetReflectorTypeTable table = new NetReflectorTypeTable(); --- 59,68 ---- NetReflectorTypeTable table = new NetReflectorTypeTable(); table.Add("NetReflectorPlugin.Test.dll"); ! Assert.AreEqual(1, table.Count); ! Assert.IsNotNull(table["plugin"], "Plugin type not found"); } ! [Test, ExpectedException(typeof (FileNotFoundException))] ! public void LoadReflectorTypesByFilename_UnknownAssembly() { NetReflectorTypeTable table = new NetReflectorTypeTable(); *************** *** 71,84 **** [Test] ! public void TestLoadReflectorTypesByFilenameFilter() { NetReflectorTypeTable table = new NetReflectorTypeTable(); ! table.Add(System.IO.Directory.GetCurrentDirectory(), "*Test.dll"); ! AssertEquals(11, table.Count); ! AssertNotNull("Plugin type not found", table["plugin"]); ! AssertNotNull("Array-test type not found", table["array-test"]); } ! [Test, ExpectedException(typeof(NetReflectorException))] public void AddMismatchingTypes() { --- 71,84 ---- [Test] ! public void LoadReflectorTypesByFilenameFilter() { NetReflectorTypeTable table = new NetReflectorTypeTable(); ! table.Add(Directory.GetCurrentDirectory(), "*Test.dll"); ! Assert.AreEqual(11, table.Count); ! Assert.IsNotNull(table["plugin"], "Plugin type not found"); ! Assert.IsNotNull(table["array-test"], "Array-test type not found"); } ! [Test, ExpectedException(typeof (NetReflectorException))] public void AddMismatchingTypes() { *************** *** 92,95 **** --- 92,106 ---- } + [Test] + public void VerifyNetReflectorTypeLoadExceptionMessage() + { + ReflectionTypeLoadException innerException = new ReflectionTypeLoadException(new Type[] {typeof (TestClass), null}, new Exception[] {new TypeLoadException("Failed to load TestSubClass")}); + Assembly assembly = Assembly.GetCallingAssembly(); + NetReflectorTypeLoadException exception = new NetReflectorTypeLoadException(assembly, innerException); + AssertContains(assembly.GetName().ToString(), exception.Message); + AssertContains("Failed to load 1 of the 2 types defined in the assembly.", exception.Message); + AssertContains("Failed to load TestSubClass", exception.Message); + } + private AssemblyBuilder CreateTemporaryAssembly() { *************** *** 103,111 **** { TypeBuilder tempType = moduleBuilder.DefineType(typeName); ! CustomAttributeBuilder attributeBuilder = new CustomAttributeBuilder(typeof(ReflectorTypeAttribute).GetConstructor(new Type[] { typeof(string) }), new object[] { reflectorName } ); tempType.SetCustomAttribute(attributeBuilder); tempType.CreateType(); return tempType; } } ! } --- 114,129 ---- { TypeBuilder tempType = moduleBuilder.DefineType(typeName); ! CustomAttributeBuilder attributeBuilder = new CustomAttributeBuilder(typeof (ReflectorTypeAttribute).GetConstructor(new Type[] {typeof (string)}), new object[] {reflectorName}); tempType.SetCustomAttribute(attributeBuilder); tempType.CreateType(); return tempType; } + + private void AssertContains(string search, string target) + { + string message = string.Format("Search substring: {0} is not contained in target: {1}", search, target); + Assert.IsTrue(target.IndexOf(search) >= 0, message); + } + } ! } \ No newline at end of file Index: NetReflectorTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/NetReflectorTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NetReflectorTest.cs 5 Nov 2003 08:29:56 -0000 1.1 --- NetReflectorTest.cs 22 Oct 2004 12:45:33 -0000 1.2 *************** *** 7,11 **** { [TestFixture] ! public class NetReflectorTest : Assertion { private NetReflectorTypeTable table = NetReflectorTypeTable.CreateDefault(); --- 7,11 ---- { [TestFixture] ! public class NetReflectorTest { private NetReflectorTypeTable table = NetReflectorTypeTable.CreateDefault(); *************** *** 76,80 **** TestInnerClass inner = new TestInnerClass(); NetReflector.Read(@"<foo name=""foo"" />", inner); ! AssertEquals("foo", inner.InnerName); } } --- 76,80 ---- TestInnerClass inner = new TestInnerClass(); NetReflector.Read(@"<foo name=""foo"" />", inner); ! Assert.AreEqual("foo", inner.InnerName); } } |
From: Owen R. <exo...@us...> - 2004-10-22 12:45:46
|
Update of /cvsroot/netreflector/NetReflector In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32655 Modified Files: .cvsignore reflector.build Log Message: improved exception handling for loading types from an assembly upgrading to nunit2.2 Index: .cvsignore =================================================================== RCS file: /cvsroot/netreflector/NetReflector/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 3 Aug 2004 10:40:39 -0000 1.3 --- .cvsignore 22 Oct 2004 12:45:32 -0000 1.4 *************** *** 2,3 **** --- 2,4 ---- dist .project + cvs_root \ No newline at end of file Index: reflector.build =================================================================== RCS file: /cvsroot/netreflector/NetReflector/reflector.build,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** reflector.build 12 Dec 2003 21:30:16 -0000 1.5 --- reflector.build 22 Oct 2004 12:45:32 -0000 1.6 *************** *** 52,59 **** <csc target="library" output="${build.dir}\${core.dll}" debug="${debug}" doc="${build.dir}\${core.dll}.xml"> <sources basedir="${src.dir}\NetReflector"> ! <includes name="**\*.cs"/> </sources> <references> ! <includes name="${lib.dir}\nunit.framework.dll"/> </references> <!-- don't warn about uncommented public methods --> --- 52,59 ---- <csc target="library" output="${build.dir}\${core.dll}" debug="${debug}" doc="${build.dir}\${core.dll}.xml"> <sources basedir="${src.dir}\NetReflector"> ! <include name="**\*.cs"/> </sources> <references> ! <include name="${lib.dir}\nunit.framework.dll"/> </references> <!-- don't warn about uncommented public methods --> *************** *** 65,72 **** <csc target="library" output="${build.dir}\${plugin.dll}" debug="${debug}" doc="${build.dir}\${plugin.dll}.xml"> <sources basedir="${src.dir}\NetReflectorPluginTest"> ! <includes name="**\*.cs"/> </sources> <references> ! <includes name="${build.dir}\${core.dll}"/> </references> <arg value="/nowarn:1591"/> --- 65,72 ---- <csc target="library" output="${build.dir}\${plugin.dll}" debug="${debug}" doc="${build.dir}\${plugin.dll}.xml"> <sources basedir="${src.dir}\NetReflectorPluginTest"> ! <include name="**\*.cs"/> </sources> <references> ! <include name="${build.dir}\${core.dll}"/> </references> <arg value="/nowarn:1591"/> *************** *** 77,85 **** <csc target="library" output="${build.dir}\${test.dll}" debug="${debug}" doc="${build.dir}\${test.dll}.xml"> <sources basedir="${src.dir}\NetReflector.Test"> ! <includes name="**\*.cs"/> </sources> <references> ! <includes name="${build.dir}\${core.dll}"/> ! <includes name="${lib.dir}\nunit.framework.dll"/> </references> <!-- don't warn about uncommented public methods --> --- 77,85 ---- <csc target="library" output="${build.dir}\${test.dll}" debug="${debug}" doc="${build.dir}\${test.dll}.xml"> <sources basedir="${src.dir}\NetReflector.Test"> ! <include name="**\*.cs"/> </sources> <references> ! <include name="${build.dir}\${core.dll}"/> ! <include name="${lib.dir}\nunit.framework.dll"/> </references> <!-- don't warn about uncommented public methods --> *************** *** 93,97 **** <nunit2> <formatter type="Plain" /> ! <test assemblyname="${build.dir}\${test.dll}" fork="true" type="${nunit.output}"/> </nunit2> </target> --- 93,97 ---- <nunit2> <formatter type="Plain" /> ! <test assemblyname="${build.dir}\${test.dll}"/> </nunit2> </target> |
From: Owen R. <exo...@us...> - 2004-10-22 12:45:46
|
Update of /cvsroot/netreflector/NetReflector/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32655/src Modified Files: .cvsignore Log Message: improved exception handling for loading types from an assembly upgrading to nunit2.2 Index: .cvsignore =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** .cvsignore 3 Aug 2004 10:40:40 -0000 1.2 --- .cvsignore 22 Oct 2004 12:45:33 -0000 1.3 *************** *** 2,3 **** --- 2,4 ---- _ReSharper.NetReflector NetReflector.resharperoptions + .ReSharper.NetReflector \ No newline at end of file |
From: Owen R. <exo...@us...> - 2004-10-22 12:45:46
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32655/src/NetReflector Modified Files: NetReflectorException.cs NetReflectorTypeTable.cs Log Message: improved exception handling for loading types from an assembly upgrading to nunit2.2 Index: NetReflectorException.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/NetReflectorException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NetReflectorException.cs 5 Nov 2003 08:29:56 -0000 1.1 --- NetReflectorException.cs 22 Oct 2004 12:45:34 -0000 1.2 *************** *** 1,3 **** --- 1,6 ---- using System; + using System.Reflection; + using System.Text; + using Exortech.NetReflector.Util; namespace Exortech.NetReflector *************** *** 13,15 **** --- 16,43 ---- } } + + public class NetReflectorTypeLoadException : NetReflectorException + { + public NetReflectorTypeLoadException(Assembly assembly, ReflectionTypeLoadException ex) : base(CreateMessage(assembly, ex)) + { + } + + private static string CreateMessage(Assembly assembly, ReflectionTypeLoadException ex) + { + StringBuilder builder = new StringBuilder(); + builder.AppendFormat("Unable to load types from assembly {0}:", assembly.GetName()).Append(Environment.NewLine); + builder.AppendFormat("Failed to load {0} of the {1} types defined in the assembly.", ex.LoaderExceptions.Length, ex.Types.Length).Append(Environment.NewLine); + builder.Append("Exceptions: ").Append(Environment.NewLine); + foreach (Exception exception in ex.LoaderExceptions) + { + TypeLoadException loaderException = exception as TypeLoadException; + if (loaderException != null) + { + builder.AppendFormat("- Unable to load type: {0}", loaderException.TypeName).Append(Environment.NewLine); + } + builder.Append(" Exception: ").Append(exception.ToString()); + } + return builder.ToString(); + } + } } Index: NetReflectorTypeTable.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/NetReflectorTypeTable.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NetReflectorTypeTable.cs 6 Jul 2004 05:13:23 -0000 1.2 --- NetReflectorTypeTable.cs 22 Oct 2004 12:45:34 -0000 1.3 *************** *** 3,7 **** using System.IO; using System.Reflection; - using Exortech.NetReflector.Util; namespace Exortech.NetReflector --- 3,6 ---- *************** *** 18,25 **** public IXmlTypeSerialiser this[string reflectorName] { ! get ! { ! return (IXmlTypeSerialiser)reflectorTypes[reflectorName]; ! } } --- 17,21 ---- public IXmlTypeSerialiser this[string reflectorName] { ! get { return (IXmlTypeSerialiser) reflectorTypes[reflectorName]; } } *************** *** 27,41 **** { ReflectorTypeAttribute attribute = ReflectorTypeAttribute.GetAttribute(type); ! if (attribute != null) { ! if (! reflectorTypes.Contains(attribute.Name)) ! { ! reflectorTypes.Add(attribute.Name, attribute.CreateSerialiser(type)); ! } ! else if (type != this[attribute.Name].Type) ! { ! throw new NetReflectorException(String.Format("Multiple types exist with the same ReflectorTypeAttribute name ({0}): {1}, {2}", ! attribute.Name, type, this[attribute.Name].Type)); ! } } } --- 23,36 ---- { ReflectorTypeAttribute attribute = ReflectorTypeAttribute.GetAttribute(type); ! if (attribute == null) return; ! ! if (! reflectorTypes.Contains(attribute.Name)) { ! reflectorTypes.Add(attribute.Name, attribute.CreateSerialiser(type)); ! } ! else if (type != this[attribute.Name].Type) ! { ! throw new NetReflectorException(string.Format("Multiple types exist with the same ReflectorTypeAttribute name ({0}): {1}, {2}", ! attribute.Name, type, this[attribute.Name].Type)); } } *************** *** 43,47 **** public void Add(Assembly assembly) { ! foreach (Type type in assembly.GetTypes()) { Add(type); --- 38,42 ---- public void Add(Assembly assembly) { ! foreach (Type type in GetTypes(assembly)) { Add(type); *************** *** 49,52 **** --- 44,59 ---- } + private Type[] GetTypes(Assembly assembly) + { + try + { + return assembly.GetTypes(); + } + catch (ReflectionTypeLoadException e) + { + throw new NetReflectorTypeLoadException(assembly, e); + } + } + public void Add(AppDomain appDomain) { *************** *** 82,84 **** } } ! } --- 89,91 ---- } } ! } \ No newline at end of file |
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32655/src/NetReflector.Test/resources Modified Files: ArrayTestClass.cs CollectionTestClass.cs EnumTestClass.cs HashTestClass.cs TestClass.cs TestInnerClass.cs TestSubClass.cs Log Message: improved exception handling for loading types from an assembly upgrading to nunit2.2 Index: TestClass.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources/TestClass.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestClass.cs 6 Jul 2004 05:13:21 -0000 1.5 --- TestClass.cs 22 Oct 2004 12:45:34 -0000 1.6 *************** *** 1,5 **** - using NUnit.Framework; using System; ! using System.Collections; namespace Exortech.NetReflector.Test --- 1,4 ---- using System; ! using NUnit.Framework; namespace Exortech.NetReflector.Test *************** *** 89,97 **** public static void AssertEquals(TestClass expected, TestClass actual) { ! Assertion.AssertEquals(expected.Count, actual.Count); ! Assertion.AssertEquals(expected.DateTime.ToString(), actual.DateTime.ToString()); ! Assertion.AssertEquals(expected.Field, actual.Field); ! Assertion.AssertEquals(expected.Message, actual.Message); ! Assertion.AssertEquals(expected.Name, actual.Name); } } --- 88,96 ---- public static void AssertEquals(TestClass expected, TestClass actual) { ! Assert.AreEqual(expected.Count, actual.Count); ! Assert.AreEqual(expected.DateTime.ToString(), actual.DateTime.ToString()); ! Assert.AreEqual(expected.Field, actual.Field); ! Assert.AreEqual(expected.Message, actual.Message); ! Assert.AreEqual(expected.Name, actual.Name); } } Index: ArrayTestClass.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources/ArrayTestClass.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ArrayTestClass.cs 6 Jul 2004 05:13:21 -0000 1.3 --- ArrayTestClass.cs 22 Oct 2004 12:45:34 -0000 1.4 *************** *** 36,47 **** public static void AssertEquals(ArrayTestClass expected, ArrayTestClass actual) { ! Assertion.AssertEquals(expected.Elements.Length, actual.Elements.Length); ! Assertion.AssertEquals(((ElementTestClass)expected.Elements[0]).ID, ((ElementTestClass)actual.Elements[0]).ID); ! Assertion.AssertEquals(((ElementTestClass)expected.Elements[1]).ID, ((ElementTestClass)actual.Elements[1]).ID); ! Assertion.AssertEquals(((ElementTestClass)expected.Elements[2]).ID, ((ElementTestClass)actual.Elements[2]).ID); ! Assertion.AssertEquals(expected.StringArray.Length, actual.StringArray.Length); ! Assertion.AssertEquals(expected.StringArray[0], actual.StringArray[0]); ! Assertion.AssertEquals(expected.StringArray[1], actual.StringArray[1]); ! Assertion.AssertEquals(expected.StringArray[2], actual.StringArray[2]); } } --- 36,47 ---- public static void AssertEquals(ArrayTestClass expected, ArrayTestClass actual) { ! Assert.AreEqual(expected.Elements.Length, actual.Elements.Length); ! Assert.AreEqual(((ElementTestClass)expected.Elements[0]).ID, ((ElementTestClass)actual.Elements[0]).ID); ! Assert.AreEqual(((ElementTestClass)expected.Elements[1]).ID, ((ElementTestClass)actual.Elements[1]).ID); ! Assert.AreEqual(((ElementTestClass)expected.Elements[2]).ID, ((ElementTestClass)actual.Elements[2]).ID); ! Assert.AreEqual(expected.StringArray.Length, actual.StringArray.Length); ! Assert.AreEqual(expected.StringArray[0], actual.StringArray[0]); ! Assert.AreEqual(expected.StringArray[1], actual.StringArray[1]); ! Assert.AreEqual(expected.StringArray[2], actual.StringArray[2]); } } Index: EnumTestClass.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources/EnumTestClass.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EnumTestClass.cs 6 Jul 2004 05:13:21 -0000 1.1 --- EnumTestClass.cs 22 Oct 2004 12:45:34 -0000 1.2 *************** *** 1,6 **** using Exortech.NetReflector.Test.Util; using NUnit.Framework; - using System; - using System.Collections; namespace Exortech.NetReflector.Test --- 1,4 ---- *************** *** 19,23 **** public static void AssertEquals(EnumTestClass actual) { ! Assertion.AssertEquals(ReflectorMemberTest.TestEnum.B, actual.TestEnum); } } --- 17,21 ---- public static void AssertEquals(EnumTestClass actual) { ! Assert.AreEqual(ReflectorMemberTest.TestEnum.B, actual.TestEnum); } } Index: HashTestClass.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources/HashTestClass.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** HashTestClass.cs 6 Jul 2004 05:13:21 -0000 1.5 --- HashTestClass.cs 22 Oct 2004 12:45:34 -0000 1.6 *************** *** 1,5 **** - using NUnit.Framework; - using System; using System.Collections; namespace Exortech.NetReflector.Test --- 1,4 ---- using System.Collections; + using NUnit.Framework; namespace Exortech.NetReflector.Test *************** *** 46,54 **** public static void AssertEquals(HashTestClass expected, HashTestClass actual) { ! Assertion.AssertEquals(expected.ElementHash.Count, actual.ElementHash.Count); foreach (object key in expected.ElementHash.Keys) { ! Assertion.Assert(actual.ElementHash.ContainsKey(key)); ! Assertion.AssertEquals(expected.ElementHash[key], actual.ElementHash[key]); } } --- 45,53 ---- public static void AssertEquals(HashTestClass expected, HashTestClass actual) { ! Assert.AreEqual(expected.ElementHash.Count, actual.ElementHash.Count); foreach (object key in expected.ElementHash.Keys) { ! Assert.IsTrue(actual.ElementHash.ContainsKey(key)); ! Assert.AreEqual(expected.ElementHash[key], actual.ElementHash[key]); } } Index: TestSubClass.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources/TestSubClass.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestSubClass.cs 5 Nov 2003 08:29:56 -0000 1.2 --- TestSubClass.cs 22 Oct 2004 12:45:34 -0000 1.3 *************** *** 1,4 **** using NUnit.Framework; - using System; namespace Exortech.NetReflector.Test --- 1,3 ---- *************** *** 27,34 **** public static void AssertEquals(TestSubClass expected, TestSubClass actual) { ! Assertion.AssertEquals(expected.InnerName, actual.InnerName); ! Assertion.AssertEquals(expected.Missing, actual.Missing); ! Assertion.AssertEquals(expected.Present, actual.Present); ! Assertion.AssertEquals(expected.SubZero, actual.SubZero); } } --- 26,33 ---- public static void AssertEquals(TestSubClass expected, TestSubClass actual) { ! Assert.AreEqual(expected.InnerName, actual.InnerName); ! Assert.AreEqual(expected.Missing, actual.Missing); ! Assert.AreEqual(expected.Present, actual.Present); ! Assert.AreEqual(expected.SubZero, actual.SubZero); } } Index: CollectionTestClass.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources/CollectionTestClass.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CollectionTestClass.cs 6 Jul 2004 05:13:21 -0000 1.3 --- CollectionTestClass.cs 22 Oct 2004 12:45:34 -0000 1.4 *************** *** 1,6 **** - using NUnit.Framework; - using System; using System.Collections; using System.Xml; namespace Exortech.NetReflector.Test --- 1,5 ---- using System.Collections; using System.Xml; + using NUnit.Framework; namespace Exortech.NetReflector.Test *************** *** 31,42 **** public static void AssertEquals(CollectionTestClass expected, CollectionTestClass actual) { ! Assertion.AssertEquals(expected.ElementList.Count, actual.ElementList.Count); ! Assertion.AssertEquals(((ElementTestClass)expected.ElementList[0]).ID, ((ElementTestClass)actual.ElementList[0]).ID); ! Assertion.AssertEquals(((ElementTestClass)expected.ElementList[1]).ID, ((ElementTestClass)actual.ElementList[1]).ID); ! Assertion.AssertEquals(((ElementTestClass)expected.ElementList[2]).ID, ((ElementTestClass)actual.ElementList[2]).ID); ! Assertion.AssertEquals(expected.List.Count, actual.List.Count); ! Assertion.AssertEquals(expected.List[0], actual.List[0]); ! Assertion.AssertEquals(expected.List[1], actual.List[1]); ! Assertion.AssertEquals(expected.List[2], actual.List[2]); } --- 30,41 ---- public static void AssertEquals(CollectionTestClass expected, CollectionTestClass actual) { ! Assert.AreEqual(expected.ElementList.Count, actual.ElementList.Count); ! Assert.AreEqual(((ElementTestClass)expected.ElementList[0]).ID, ((ElementTestClass)actual.ElementList[0]).ID); ! Assert.AreEqual(((ElementTestClass)expected.ElementList[1]).ID, ((ElementTestClass)actual.ElementList[1]).ID); ! Assert.AreEqual(((ElementTestClass)expected.ElementList[2]).ID, ((ElementTestClass)actual.ElementList[2]).ID); ! Assert.AreEqual(expected.List.Count, actual.List.Count); ! Assert.AreEqual(expected.List[0], actual.List[0]); ! Assert.AreEqual(expected.List[1], actual.List[1]); ! Assert.AreEqual(expected.List[2], actual.List[2]); } Index: TestInnerClass.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources/TestInnerClass.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestInnerClass.cs 5 Nov 2003 08:29:56 -0000 1.2 --- TestInnerClass.cs 22 Oct 2004 12:45:34 -0000 1.3 *************** *** 1,4 **** using NUnit.Framework; - using System; namespace Exortech.NetReflector.Test --- 1,3 ---- *************** *** 74,80 **** public static void AssertEquals(TestInnerClass expected, TestInnerClass actual) { ! Assertion.AssertEquals(expected.InnerName, actual.InnerName); ! Assertion.AssertEquals(expected.Missing, actual.Missing); ! Assertion.AssertEquals(expected.Present, actual.Present); } } --- 73,79 ---- public static void AssertEquals(TestInnerClass expected, TestInnerClass actual) { ! Assert.AreEqual(expected.InnerName, actual.InnerName); ! Assert.AreEqual(expected.Missing, actual.Missing); ! Assert.AreEqual(expected.Present, actual.Present); } } |
From: Owen R. <exo...@us...> - 2004-10-22 12:45:46
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32655/src/NetReflector.Test/Util Modified Files: ReflectionUtilTest.cs ReflectorMemberTest.cs XmlElementListTest.cs Log Message: improved exception handling for loading types from an assembly upgrading to nunit2.2 Index: ReflectionUtilTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Util/ReflectionUtilTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ReflectionUtilTest.cs 6 Jul 2004 05:13:20 -0000 1.2 --- ReflectionUtilTest.cs 22 Oct 2004 12:45:33 -0000 1.3 *************** *** 6,17 **** { [TestFixture] ! public class ReflectionUtilTest : Assertion { public void IsCommonType() { ! Assert("String member should be common type", ReflectionUtil.IsCommonType(typeof(string))); ! Assert("int should be common type", ReflectionUtil.IsCommonType(typeof(int))); ! Assert("DateTime should be common type", ReflectionUtil.IsCommonType(typeof(DateTime))); ! Assert("Enum should be common type", ReflectionUtil.IsCommonType(typeof(ReflectorMemberTest.TestEnum))); } --- 6,17 ---- { [TestFixture] ! public class ReflectionUtilTest { public void IsCommonType() { ! Assert.IsTrue(ReflectionUtil.IsCommonType(typeof(string)), "String member should be common type"); ! Assert.IsTrue(ReflectionUtil.IsCommonType(typeof(int)), "int should be common type"); ! Assert.IsTrue(ReflectionUtil.IsCommonType(typeof(DateTime)), "DateTime should be common type"); ! Assert.IsTrue(ReflectionUtil.IsCommonType(typeof(ReflectorMemberTest.TestEnum)), "Enum should be common type"); } *************** *** 20,24 **** { TestClass testClass = (TestClass)ReflectionUtil.CreateInstance(typeof(TestClass)); ! AssertNotNull(testClass); } --- 20,24 ---- { TestClass testClass = (TestClass)ReflectionUtil.CreateInstance(typeof(TestClass)); ! Assert.IsNotNull(testClass); } Index: ReflectorMemberTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Util/ReflectorMemberTest.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ReflectorMemberTest.cs 6 Jul 2004 05:13:21 -0000 1.3 --- ReflectorMemberTest.cs 22 Oct 2004 12:45:33 -0000 1.4 *************** *** 7,11 **** { [TestFixture] ! public class ReflectorMemberTest : Assertion { private MemberInfo GetMember(string name) --- 7,11 ---- { [TestFixture] ! public class ReflectorMemberTest { private MemberInfo GetMember(string name) *************** *** 20,24 **** TestClass testClass = new TestClass(); member.SetValue(testClass, "Hello"); ! AssertEquals("Hello", testClass.Name); } --- 20,24 ---- TestClass testClass = new TestClass(); member.SetValue(testClass, "Hello"); ! Assert.AreEqual("Hello", testClass.Name); } *************** *** 29,33 **** TestClass testClass = new TestClass(); member.SetValue(testClass, "99"); ! AssertEquals(99, testClass.Count); } --- 29,33 ---- TestClass testClass = new TestClass(); member.SetValue(testClass, "99"); ! Assert.AreEqual(99, testClass.Count); } *************** *** 46,51 **** TestClass testClass = new TestClass(); member.SetValue(testClass, new TestSubClass()); ! AssertNotNull(testClass.InnerClass); ! AssertEquals(typeof(TestSubClass), testClass.InnerClass.GetType()); } --- 46,51 ---- TestClass testClass = new TestClass(); member.SetValue(testClass, new TestSubClass()); ! Assert.IsNotNull(testClass.InnerClass); ! Assert.AreEqual(typeof(TestSubClass), testClass.InnerClass.GetType()); } *************** *** 56,60 **** TestClass testClass = new TestClass(); member.SetValue(testClass, null); ! AssertNull(testClass.InnerClass); } --- 56,60 ---- TestClass testClass = new TestClass(); member.SetValue(testClass, null); ! Assert.IsNull(testClass.InnerClass); } *************** *** 79,91 **** { ReflectorMember member = ReflectorMember.Create(typeof(EnumTestClass).GetField("EnumValue")); ! AssertNotNull("member not found", member); EnumTestClass testClass = new EnumTestClass(); ! AssertEquals(TestEnum.D, testClass.EnumValue); member.SetValue(testClass, TestEnum.A); // set value as enum ! AssertEquals(TestEnum.A, testClass.EnumValue); member.SetValue(testClass, "B"); // set value as string ! AssertEquals(TestEnum.B, testClass.EnumValue); member.SetValue(testClass, "c"); // set value as string ! AssertEquals(TestEnum.C, testClass.EnumValue); } --- 79,91 ---- { ReflectorMember member = ReflectorMember.Create(typeof(EnumTestClass).GetField("EnumValue")); ! Assert.IsNotNull(member, "member not found"); EnumTestClass testClass = new EnumTestClass(); ! Assert.AreEqual(TestEnum.D, testClass.EnumValue); member.SetValue(testClass, TestEnum.A); // set value as enum ! Assert.AreEqual(TestEnum.A, testClass.EnumValue); member.SetValue(testClass, "B"); // set value as string ! Assert.AreEqual(TestEnum.B, testClass.EnumValue); member.SetValue(testClass, "c"); // set value as string ! Assert.AreEqual(TestEnum.C, testClass.EnumValue); } Index: XmlElementListTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Util/XmlElementListTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XmlElementListTest.cs 5 Nov 2003 08:29:56 -0000 1.1 --- XmlElementListTest.cs 22 Oct 2004 12:45:33 -0000 1.2 *************** *** 1,6 **** using Exortech.NetReflector.Util; using NUnit.Framework; - using System; - using System.Xml; namespace Exortech.NetReflector.Test.Util --- 1,5 ---- + using System.Xml; using Exortech.NetReflector.Util; using NUnit.Framework; namespace Exortech.NetReflector.Test.Util *************** *** 13,21 **** { XmlNode node = XmlDocumentResource.ElementListWithComment; ! Assertion.AssertEquals(3, node.ChildNodes.Count); XmlElementList list = new XmlElementList(node.ChildNodes); ! Assertion.AssertEquals(2, list.Count); ! Assertion.AssertEquals("hashitem1", list[0].Attributes["id"].Value); ! Assertion.AssertEquals("hashitem3", list[1].Attributes["id"].Value); } --- 12,20 ---- { XmlNode node = XmlDocumentResource.ElementListWithComment; ! Assert.AreEqual(3, node.ChildNodes.Count); XmlElementList list = new XmlElementList(node.ChildNodes); ! Assert.AreEqual(2, list.Count); ! Assert.AreEqual("hashitem1", list[0].Attributes["id"].Value); ! Assert.AreEqual("hashitem3", list[1].Attributes["id"].Value); } *************** *** 25,31 **** foreach (XmlNode node in XmlElementList.Create(XmlDocumentResource.ElementListWithComment.ChildNodes)) { ! Assertion.AssertNotNull(node); } } } ! } --- 24,30 ---- foreach (XmlNode node in XmlElementList.Create(XmlDocumentResource.ElementListWithComment.ChildNodes)) { ! Assert.IsNotNull(node); } } } ! } \ No newline at end of file |
From: Steve B. <St...@ma...> - 2004-10-07 18:52:36
|
What happened to the documentation??? =20 http://confluence.public.thoughtworks.org/display/NETREFLECTOR/One+minut e+introduction http://confluence.public.thoughtworks.org/display/NETREFLECTOR/Two+minut e+tutorial =20 I could swear I read it just earlier this week? =20 Maybe I am going crazy... =20 Thanks, =20 Steve |
From: Mike R. <mik...@us...> - 2004-08-03 10:40:49
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Serialisers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24202/src/NetReflector.Test/Serialisers Modified Files: XmlMemberSerialiserTest.cs Log Message: NetReflector now ignores any members that are complex types, but not implemented using a Reflector Type (See XmlMemberSerialiserTest.ShouldIgnoreAnyMembersWithInstanceTypesThatAreNotSetToANetReflectorType) Index: XmlMemberSerialiserTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Serialisers/XmlMemberSerialiserTest.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** XmlMemberSerialiserTest.cs 6 Jul 2004 05:13:20 -0000 1.3 --- XmlMemberSerialiserTest.cs 3 Aug 2004 10:40:41 -0000 1.4 *************** *** 1,5 **** using NUnit.Framework; using System; - using System.Collections; namespace Exortech.NetReflector.Test.Serialisers --- 1,4 ---- *************** *** 121,124 **** --- 120,134 ---- EnumTestClass.AssertEquals(testEnum); } + + [Test] + public void ShouldIgnoreAnyMembersWithInstanceTypesThatAreNotSetToANetReflectorType() + { + IgnoreNonReflectorTypeTestClass target = new IgnoreNonReflectorTypeTestClass(); + target.MyComplexMember = new NonNetReflectorComplexMemberType(); + + string serializedForm = NetReflector.Write(target); + + AssertEquals(@"<ignorenonreflectortype />", serializedForm); + } } } |
From: Mike R. <mik...@us...> - 2004-08-03 10:40:49
|
Update of /cvsroot/netreflector/NetReflector/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24202/src Modified Files: .cvsignore Log Message: NetReflector now ignores any members that are complex types, but not implemented using a Reflector Type (See XmlMemberSerialiserTest.ShouldIgnoreAnyMembersWithInstanceTypesThatAreNotSetToANetReflectorType) Index: .cvsignore =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 25 Oct 2002 09:24:19 -0000 1.1 --- .cvsignore 3 Aug 2004 10:40:40 -0000 1.2 *************** *** 1 **** ! *.suo \ No newline at end of file --- 1,3 ---- ! *.suo ! _ReSharper.NetReflector ! NetReflector.resharperoptions |
From: Mike R. <mik...@us...> - 2004-08-03 10:40:49
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector/Serialisers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24202/src/NetReflector/Serialisers Modified Files: XmlMemberSerialiser.cs Log Message: NetReflector now ignores any members that are complex types, but not implemented using a Reflector Type (See XmlMemberSerialiserTest.ShouldIgnoreAnyMembersWithInstanceTypesThatAreNotSetToANetReflectorType) Index: XmlMemberSerialiser.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/Serialisers/XmlMemberSerialiser.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** XmlMemberSerialiser.cs 6 Jul 2004 05:13:23 -0000 1.4 --- XmlMemberSerialiser.cs 3 Aug 2004 10:40:40 -0000 1.5 *************** *** 30,34 **** { object value = member.GetValue(target); ! if (value != null) { writer.WriteStartElement(attribute.Name); --- 30,34 ---- { object value = member.GetValue(target); ! if (value != null && SerializableValue(value)) { writer.WriteStartElement(attribute.Name); *************** *** 43,46 **** --- 43,51 ---- } + private bool SerializableValue(object value) + { + return (attribute.InstanceTypeKey == null || ReflectorTypeAttribute.GetAttribute(value) != null); + } + protected virtual void WriteValue(XmlWriter writer, object value) { |
From: Mike R. <mik...@us...> - 2004-08-03 10:40:49
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflectorPluginTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24202/src/NetReflectorPluginTest Added Files: .cvsignore Log Message: NetReflector now ignores any members that are complex types, but not implemented using a Reflector Type (See XmlMemberSerialiserTest.ShouldIgnoreAnyMembersWithInstanceTypesThatAreNotSetToANetReflectorType) --- NEW FILE: .cvsignore --- NetReflectorPluginTest.csproj.user bin obj |