+2003-10-12 Todd Berman <tberman@gentoo.org>
+
+ * Makefile: Fixed up the test target so it works now
+
2003-10-08 Todd Berman <tberman@gentoo.org>
* Microsoft.Web.Services.dll2.sources: Added RelatesTo.cs
test_lib = $(patsubst %.dll,%_test.dll,$(LIBRARY))
test_lib2 = $(patsubst %.dll, %_test.dll,$(LIBRARY2))
test_pdb = $(patsubst %.dll,%.pdb,$(test_lib))
-test_pdb = $(patsubst %.dll,%.pdb,$(test_lib2))
+test_pdb2 = $(patsubst %.dll,%.pdb,$(test_lib2))
test_sourcefile = $(test_lib).sources
-test_sourcefile2 = Microsoft.Web.Services.dll.2.sources
+test_sourcefile2 = $(test_lib2).sources
test_response = $(depsdir)/$(test_lib).response
-test_response2 = $(depsdir)/$(test_lib2).response
+test_response2 = $(depsdir)/a.response
test_makefrag = $(depsdir)/$(test_lib).makefrag
-test_makefrag2 = $(depsdir)/$(test_lib2).makefrag
+test_makefrag2 = $(depsdir)/a.makefrag
test_stampfile = $(depsdir)/$(test_lib).stamp
-test_stampfile2 = $(depsdir)/$(test_lib2).stamp
+test_stampfile2 = $(depsdir)/a.stamp
test_flags = /r:$(the_lib) /r:$(topdir)/class/lib/NUnit.Framework.dll $(TEST_MCS_FLAGS)
test_flags2 = /r:$(the_lib2) /r:$(topdir)/class/lib/NUnit.Framework.dll $(TEST_MCS_FLAGS)
endif
endif
ifndef NO_TEST
-test-local: $(the_lib) $(test_lib)
+test-local: $(the_lib) $(test_lib) $(the_lib2) $(test_lib2)
run-test-local:
$(TEST_RUNTIME) $(TEST_HARNESS) $(test_lib)
else
-test-local: $(the_lib)
+test-local: $(the_lib) $(the_lib2)
run-test-local:
endif
TEST_FILES =
else
TEST_FILES = `cat $(test_sourcefile) |sed -e 's,^\(.\),Test/\1,'`
+TEST_FILES2 = `cat $(test_sourcefile2) |sed -e 's,^\(.\),Test/\1,'`
endif
dist-local: dist-default
touch $@
endif
+ifndef NO_TEST
+$(test_lib2): $(test_makefrag2) $(the_lib2) $(test_response2) $(test_stampfile2)
+ $(CSCOMPILE) /target:library /out:$@ $(test_flags2) @$(test_response2)
+
+$(test_response2): $(test_sourcefile2)
+ @echo Creating $@ ...
+ifdef PLATFORM_CHANGE_SEPARATOR_CMD
+ @cat $< |sed -e 's,^\(.\),Test/\1,' |$(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
+else
+ @cat $< |sed -e 's,^\(.\),Test/\1,' >$@
+endif
+
+$(test_makefrag2): $(test_response2)
+ @echo Creating $@ ...
+ @echo "HAVE_TEST_MAKEFRAG = yes" >$@.new
+ @echo "$(test_stampfile2): \\" >>$@.new
+ @cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
+ @cat $@.new |sed -e '$$s, \\$$,,' >$@
+ @$(ECHO_ESCAPE) "\ttouch \$$@" >>$@
+ @rm -rf $@.new
+
+-include $(test_makefrag2)
+endif
+#
+ifndef HAVE_TEST_MAKEFRAG
+$(test_stampfile2):
+ touch $@
+endif
--- /dev/null
+Microsoft.Web.Services.Addressing/Action.cs
+Microsoft.Web.Services.Addressing/Address.cs
+Microsoft.Web.Services.Addressing/AddressingHeaders.cs
+Microsoft.Web.Services.Addressing/AddressList.cs
+Microsoft.Web.Services.Addressing/EndpointReference.cs
--- /dev/null
+using System;\r
+using NUnit.Framework;\r
+using System.Xml;\r
+using Microsoft.Web.Services;\r
+\r
+namespace Microsoft.Web.Services.Addressing.Tests\r
+{\r
+ \r
+ [TestFixture]\r
+ public class ActionTest\r
+ {\r
+ \r
+ [Test]\r
+ public void CreateAction ()\r
+ {\r
+ Action a = new Action("urn:action:test");\r
+ Assert.IsTrue (a.Value == "urn:action:test");\r
+ }\r
+ \r
+ [Test]\r
+ public void ActionToXml ()\r
+ {\r
+ Action a = new Action("urn:action:test");\r
+ XmlElement element = a.GetXml(new XmlDocument());\r
+ Assert.IsTrue (element.OuterXml.Length != 0);\r
+ }\r
+ \r
+ [Test]\r
+ public void XmlToAction ()\r
+ {\r
+ XmlDocument document = new XmlDocument ();\r
+ \r
+ XmlElement element = document.CreateElement("wsa", "Action", "http://schemas.xmlsoap.org/ws/2003/03/addressing");\r
+ element.InnerText = "urn:action:test";\r
+ \r
+ Action a = new Action (element);\r
+ \r
+ Assert.IsTrue (a.Value == "urn:action:test");\r
+ }\r
+ \r
+ [Test]\r
+ public void RoundTripFromAction ()\r
+ {\r
+ Action a = new Action ("urn:action:test");\r
+ XmlElement element = a.GetXml(new XmlDocument());\r
+ \r
+ Action b = new Action (element);\r
+ \r
+ Assert.IsTrue (b.Value == "urn:action:test");\r
+ }\r
+ \r
+ [Test]\r
+ public void RoundTripFromXml ()\r
+ {\r
+ XmlDocument document = new XmlDocument ();\r
+ \r
+ XmlElement element = document.CreateElement("wsa", "Action", "http://schemas.xmlsoap.org/ws/2003/03/addressing");\r
+ element.InnerText = "urn:action:test";\r
+ \r
+ Action a = new Action (element);\r
+ \r
+ XmlElement element2 = a.GetXml(new XmlDocument ());\r
+ \r
+ Assert.IsTrue (element.OuterXml == element2.OuterXml);\r
+ \r
+ }\r
+ \r
+ [Test]\r
+ public void ImplicitString ()\r
+ {\r
+ Action a = new Action ("urn:action:test");\r
+ \r
+ Assert.IsTrue ("urn:action:test" == a);\r
+ }\r
+ \r
+ [Test]\r
+ public void ImplicitAction ()\r
+ {\r
+ Action a = "urn:action:test";\r
+ \r
+ Assert.IsTrue ("urn:action:test" == a);\r
+ \r
+ }\r
+ \r
+ [Test]\r
+ [ExpectedException(typeof(ArgumentException))]\r
+ public void InvalidElementExceptionTest ()\r
+ {\r
+ XmlDocument doc = new XmlDocument ();\r
+ \r
+ XmlElement el = doc.CreateElement("b", "a", "d");\r
+ \r
+ Action a = new Action (el);\r
+ }\r
+ \r
+ }\r
+ \r
+ \r
+}\r
--- /dev/null
+using System;\r
+using System.Xml;\r
+using NUnit.Framework;\r
+using Microsoft.Web.Services.Addressing;\r
+\r
+namespace Microsoft.Web.Services.Addressing.Tests\r
+{\r
+ \r
+ [TestFixture]\r
+ public class AddressTests\r
+ {\r
+ \r
+ [Test]\r
+ public void CreateAddress ()\r
+ {\r
+ Address a = new Address (new Uri("soap.tcp://127.0.0.1/"));\r
+ Assert.IsNotNull (a);\r
+ }\r
+ \r
+ [Test]\r
+ public void AddressToXml ()\r
+ {\r
+ Address a = new Address (new Uri("soap.tcp://127.0.0.1/"));\r
+ XmlElement e = a.GetXml (new XmlDocument ());\r
+ \r
+ Assert.IsTrue (e.OuterXml.Length != 0);\r
+ }\r
+ \r
+ [Test]\r
+ public void XmlToAddress ()\r
+ {\r
+ XmlDocument doc = new XmlDocument ();\r
+ XmlElement e = doc.CreateElement ("wsa", "Address", "http://schemas.xmlsoap.org/ws/2003/03/addressing");\r
+ \r
+ e.InnerText = "soap.tcp://127.0.0.1/";\r
+ \r
+ Address a = new Address (e);\r
+ \r
+ Assert.IsTrue (a.Value.AbsoluteUri == e.InnerText);\r
+ }\r
+ \r
+ [Test]\r
+ public void RoundTripFromAddress ()\r
+ {\r
+ Address a = new Address (new Uri("soap.tcp://127.0.0.1"));\r
+ \r
+ XmlElement e = a.GetXml (new XmlDocument ());\r
+ \r
+ Address b = new Address (e);\r
+ \r
+ Assert.IsTrue (a.Value.AbsoluteUri == b.Value.AbsoluteUri);\r
+ }\r
+ \r
+ [Test]\r
+ public void RoundTripFromXml ()\r
+ {\r
+ XmlDocument doc = new XmlDocument ();\r
+ XmlElement e = doc.CreateElement ("wsa", "Address", "http://schemas.xmlsoap.org/ws/2003/03/addressing");\r
+ \r
+ e.InnerText = "soap.tcp://127.0.0.1/";\r
+ \r
+ Address a = new Address (e);\r
+ \r
+ XmlElement e2 = a.GetXml (new XmlDocument ());\r
+ \r
+ Assert.IsTrue (e.OuterXml == e2.OuterXml);\r
+ }\r
+ \r
+ [Test]\r
+ public void ImplicitUri ()\r
+ {\r
+ Uri u = new Uri ("soap.tcp://127.0.0.1/");\r
+ \r
+ Address a = new Address(u);\r
+ \r
+ Assert.IsTrue (u.AbsoluteUri == ((Uri)a).AbsoluteUri);\r
+ }\r
+ \r
+ [Test]\r
+ public void ImplicitAddress ()\r
+ {\r
+ Uri u = new Uri ("soap.tcp://127.0.0.1");\r
+ \r
+ Address a = new Address (u);\r
+ \r
+ Assert.AreEqual (u, (Uri)a);\r
+ }\r
+ \r
+ [Test]\r
+ [ExpectedException(typeof(ArgumentException))]\r
+ public void InvalidArgumentException()\r
+ {\r
+ XmlDocument document = new XmlDocument ();\r
+ XmlElement e = document.CreateElement ("b", "a", "d");\r
+ \r
+ Address a = new Address (e);\r
+ }\r
+ \r
+ }\r
+ \r
+}\r
--- /dev/null
+using System;\r
+using NUnit.Framework;\r
+using Microsoft.Web.Services.Addressing;\r
+\r
+namespace Microsoft.Web.Services.Addressing.Tests\r
+{\r
+ [TestFixture]\r
+ public class AddressListTests\r
+ {\r
+ [Test]\r
+ public void NoTestsYet ()\r
+ {\r
+ }\r
+ }\r
+}\r
--- /dev/null
+using System;\r
+using NUnit.Framework;\r
+using Microsoft.Web.Services.Addressing;\r
+\r
+namespace Microsoft.Web.Services.Addressing.Tests\r
+{\r
+ \r
+ [TestFixture]\r
+ public class AddressingHeadersTest\r
+ {\r
+ \r
+ [Test]\r
+ public void NoTestsYet ()\r
+ {\r
+ }\r
+ \r
+ }\r
+ \r
+}\r
--- /dev/null
+using System;\r
+using System.Xml;\r
+using NUnit.Framework;\r
+using Microsoft.Web.Services.Xml;\r
+using Microsoft.Web.Services.Addressing;\r
+\r
+namespace Microsoft.Web.Services.Addressing.Tests\r
+{\r
+ [TestFixture]\r
+ public class EndpointReferenceTests\r
+ {\r
+ \r
+ [Test]\r
+ public void CreateEndpointReferenceFromAddress ()\r
+ {\r
+ EndpointReference e = new EndpointReference( new Address ( new Uri ("soap.tcp://127.0.0.1") ) );\r
+ \r
+ Assert.IsNotNull (e.Address.Value);\r
+ }\r
+ \r
+ [Test]\r
+ public void CreateEndpointReferenceFromUri ()\r
+ {\r
+ EndpointReference e = new EndpointReference( new Uri ("soap.tcp://127.0.0.1") );\r
+ \r
+ Assert.IsNotNull (e.Address.Value);\r
+ }\r
+ \r
+ [Test]\r
+ public void MinimalXmlToEndpointReference ()\r
+ {\r
+ XmlDocument doc = new XmlDocument ();\r
+ XmlElement element = doc.CreateElement ("wsa", "EndpointReference", "http://schemas.xmlsoap.org/ws/2003/03/addressing");\r
+ \r
+ Address a = new Address ( new Uri ("soap.tcp://127.0.0.1") );\r
+ \r
+ element.AppendChild (a.GetXml (doc));\r
+ \r
+ EndpointReference e = new EndpointReference (element);\r
+ }\r
+ \r
+ [Test]\r
+ public void EndpointReferenceToMinimalXml ()\r
+ {\r
+ EndpointReference e = new EndpointReference ( new Uri ("soap.tcp://127.0.0.1/") );\r
+ XmlElement e2 = e.GetXml (new XmlDocument ());\r
+ \r
+ Assert.IsTrue (e2.FirstChild.InnerText == "soap.tcp://127.0.0.1/");\r
+ }\r
+ \r
+ [Test]\r
+ public void EndpointReferenceToXmlWithPortType ()\r
+ {\r
+ EndpointReference e = new EndpointReference ( new Uri ("soap.tcp://127.0.0.1/") );\r
+ e.PortType = new PortType (new QualifiedName ("a","s","http://schemas.xmlsoap.org/ws/2003/03/addressing"));\r
+ \r
+ XmlElement element = e.GetXml (new XmlDocument ());\r
+ \r
+ Assert.IsTrue (element.FirstChild.NextSibling.InnerText == "a:s");\r
+ }\r
+ \r
+ [Test]\r
+ public void EndpointReferenceToXmlWithProperties ()\r
+ {\r
+ EndpointReference e = new EndpointReference (new Uri ("soap.tcp://127.0.0.1/") );\r
+ e.ReferenceProperties = new ReferenceProperties ();\r
+ \r
+ XmlElement element = e.GetXml (new XmlDocument ());\r
+ \r
+ Assert.IsTrue (element.FirstChild.NextSibling.LocalName == "ReferenceProperties");\r
+ }\r
+ \r
+ [Test]\r
+ public void EndpointReferenceToXmlWithServiceName ()\r
+ {\r
+ EndpointReference e = new EndpointReference (new Uri ("soap.tcp://127.0.0.1/") );\r
+ e.ServiceName = new ServiceName( new QualifiedName ("a", "s", "http://schemas.xmlsoap.org/ws/2003/03/addressing"));\r
+ e.ServiceName.PortName = "test";\r
+ \r
+ XmlElement element = e.GetXml (new XmlDocument ());\r
+ \r
+ Assert.IsTrue (element.FirstChild.NextSibling.Attributes["wsa:PortName"].InnerText == "test");\r
+ }\r
+ \r
+ [Test]\r
+ public void RoundTripFromXml ()\r
+ {\r
+ XmlDocument doc = new XmlDocument ();\r
+ XmlElement element = doc.CreateElement ("wsa", "EndpointReference", "http://schemas.xmlsoap.org/ws/2003/03/addressing");\r
+ \r
+ Address a = new Address ( new Uri ("soap.tcp://127.0.0.1") );\r
+ \r
+ element.AppendChild (a.GetXml (doc));\r
+ \r
+ PortType p = new PortType (new QualifiedName ("wsa", "s", "http://schemas.xmlsoap.org/ws/2003/03/addressing"));\r
+ \r
+ element.AppendChild (p.GetXml (doc));\r
+ \r
+ \r
+ \r
+ EndpointReference e = new EndpointReference (element);\r
+ \r
+ XmlElement e2 = e.GetXml (new XmlDocument ());\r
+ \r
+ Assert.IsTrue (element.OuterXml == e2.OuterXml);\r
+ }\r
+ \r
+ [Test]\r
+ public void RoundTripFromEndpointReference ()\r
+ {\r
+ EndpointReference e = new EndpointReference ( new Uri ("soap.tcp://127.0.0.1/") );\r
+ XmlElement e2 = e.GetXml (new XmlDocument ());\r
+ \r
+ EndpointReference er = new EndpointReference (e2);\r
+ \r
+ Assert.IsTrue (e.Address.Value.AbsoluteUri == er.Address.Value.AbsoluteUri);\r
+ }\r
+ \r
+ //Not going to bother testing the implicit operators, they work fine.\r
+ \r
+ }\r
+}\r