From: <bo...@us...> - 2009-05-04 15:43:59
|
Revision: 311 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=311&view=rev Author: bodewig Date: 2009-05-04 15:43:53 +0000 (Mon, 04 May 2009) Log Message: ----------- Placeholder class files for XMLUnit.NET 2, first build system refactorings. Much more to come. Modified Paths: -------------- trunk/xmlunit/xmlunit.nant.build Added Paths: ----------- trunk/xmlunit/src/main/net-core/ trunk/xmlunit/src/main/net-core/ISource.cs trunk/xmlunit/src/main/net-core/builder/ trunk/xmlunit/src/main/net-core/builder/Input.cs Added: trunk/xmlunit/src/main/net-core/ISource.cs =================================================================== --- trunk/xmlunit/src/main/net-core/ISource.cs (rev 0) +++ trunk/xmlunit/src/main/net-core/ISource.cs 2009-05-04 15:43:53 UTC (rev 311) @@ -0,0 +1,23 @@ +/* + Licensed to the XMLUnit developers under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + This file is licensed to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +using System.Xml; + +namespace net.sf.xmlunit { + public interface ISource { + XmlReader Reader {get;} + } +} Added: trunk/xmlunit/src/main/net-core/builder/Input.cs =================================================================== --- trunk/xmlunit/src/main/net-core/builder/Input.cs (rev 0) +++ trunk/xmlunit/src/main/net-core/builder/Input.cs 2009-05-04 15:43:53 UTC (rev 311) @@ -0,0 +1,51 @@ +/* + Licensed to the XMLUnit developers under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + This file is licensed to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +using System.Xml; + +namespace net.sf.xmlunit.builder { + public static class Input { + internal class Source : ISource { + private readonly XmlReader reader; + internal Source(XmlReader r) { + reader = r; + } + public XmlReader Reader { + get { + return reader; + } + } + } + + public interface IBuilder { + ISource Build(); + } + + internal class DOMBuilder : IBuilder { + private readonly ISource source; + internal DOMBuilder(XmlDocument d) { + source = new Source(new XmlNodeReader(d)); + } + public ISource Build() { + return source; + } + } + + public static IBuilder FromDocument(XmlDocument d) { + return new DOMBuilder(d); + } + } +} Modified: trunk/xmlunit/xmlunit.nant.build =================================================================== --- trunk/xmlunit/xmlunit.nant.build 2009-05-04 15:16:06 UTC (rev 310) +++ trunk/xmlunit/xmlunit.nant.build 2009-05-04 15:43:53 UTC (rev 311) @@ -1,11 +1,15 @@ <project name="xmlunit" description="XmlUnit for .Net" default="compile"> - <property name="project.version" value="0.4" overwrite="false"/> + <property name="project.version" value="2.0" overwrite="false"/> <property name="base.dir" value="${project::get-base-directory()}" overwrite="false"/> - <property name="src.dir" value="${base.dir}/src/main/net-legacy" overwrite="false"/> + <property name="core.src.dir" value="${base.dir}/src/main/net-core" overwrite="false"/> + <property name="legacy.src.dir" value="${base.dir}/src/main/net-legacy" overwrite="false"/> <property name="tests.src.dir" value="${base.dir}/src/tests/net-legacy" overwrite="false"/> - <property name="bin.dir" value="${base.dir}/bin" overwrite="false"/> + + <property name="build.dir" value="${base.dir}/build/net" overwrite="false"/> + <property name="bin.dir" value="${build.dir}/bin" overwrite="false"/> + <property name="csc.verbose" value="false" overwrite="false"/> <property name="deploy.file" overwrite="false" value="${project::get-name()}-${project.version}.zip"/> @@ -24,19 +28,29 @@ <target name="clean" description="clean out compiled files"> <delete failonerror="false"> - <fileset basedir="${bin.dir}"> - <include name="${project::get-name()}.*"/> - </fileset> + <fileset basedir="${build.dir}"/> </delete> </target> - <target name="compile" description="compile all source files" depends="init"> - <csc target="library" output="${bin.dir}/${project::get-name()}.dll" + <target name="compile-core" + description="compile core source files" depends="init"> + <csc target="library" output="${bin.dir}/${project::get-name()}-core.dll" + debug="true" verbose="${csc.verbose}"> + <sources basedir="${core.src.dir}"> + <include name="**/*.cs"/> + </sources> + </csc> + </target> + + <target name="compile" description="compile all source files" + depends="compile-core"> + <csc target="library" output="${bin.dir}/${project::get-name()}-legacy.dll" debug="true" verbose="${csc.verbose}"> <references basedir="${bin.dir}"> + <include name="${project::get-name()}-core.dll"/> <include name="${nunit.v2.assembly}"/> </references> - <sources basedir="${src.dir}"> + <sources basedir="${legacy.src.dir}"> <include name="*.cs"/> </sources> </csc> @@ -45,7 +59,8 @@ output="${bin.dir}/${project::get-name()}.tests.dll" debug="true" verbose="${csc.verbose}"> <references basedir="${bin.dir}"> - <include name="${project::get-name()}.dll"/> + <include name="${project::get-name()}-core.dll"/> + <include name="${project::get-name()}-legacy.dll"/> <include name="${nunit.v2.assembly}"/> </references> <sources basedir="${tests.src.dir}"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |