Skip to content

Commit 3038cc8

Browse files
committed
Fully nugetized. Get log4net and nunit from nuget. Build nuget package with build script using psake and powershell.
1 parent 38cda1e commit 3038cc8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+104733
-65
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ App_Data/
1818
*.resources
1919
SGMLTests/test-results/*.xml
2020
test-results/*.xml
21-
*.test-cache
21+
*.test-cache
22+
build/

SGMLReader.nuspec

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<package >
3+
<metadata>
4+
<id>SgmlReader</id>
5+
<version>1.8.8</version>
6+
<authors>Chris Lovett, Steve Bjorg</authors>
7+
<owners>Andy Sherwood</owners>
8+
<licenseUrl>https://github.com/MindTouch/SGMLReader/blob/master/license.txt</licenseUrl>
9+
<projectUrl>https://github.com/MindTouch/SGMLReader</projectUrl>
10+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
11+
<summary>Converts SGML to XML via XmlReader API</summary>
12+
<description>SGMLReader is a versatile C# .NET library written by Chris Lovett for parsing HTML/SGML files. The original community around SGMLReader used to be hosted by GotDotNet, but this site was phased out (update: it appears the code has re-surfaced on MSDN Code Gallery, but without any updates). MindTouch Dream and MindTouch Core use the SGMLReader library extensively. Over the last few years we have made many improvements to this code; thereby, making us the de facto maintainers of this library. In the spirit of the original author, we're providing back these changes on the MindTouch Developer Center site.</description>
13+
<tags>SGML XML</tags>
14+
</metadata>
15+
</package>

SGMLTests/SGMLTests.csproj

+7-8
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,20 @@
3434
<ConsolePause>false</ConsolePause>
3535
</PropertyGroup>
3636
<ItemGroup>
37-
<Reference Include="System" />
38-
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821">
39-
<SpecificVersion>False</SpecificVersion>
40-
<HintPath>..\redist\log4net.dll</HintPath>
37+
<Reference Include="log4net">
38+
<HintPath>..\packages\log4net.1.2.10\lib\2.0\log4net.dll</HintPath>
39+
</Reference>
40+
<Reference Include="nunit.framework">
41+
<HintPath>..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
4142
</Reference>
43+
<Reference Include="System" />
4244
<Reference Include="System.Core">
4345
<RequiredTargetFramework>3.5</RequiredTargetFramework>
4446
</Reference>
4547
<Reference Include="System.Data" />
4648
<Reference Include="System.Xml.Linq">
4749
<RequiredTargetFramework>3.5</RequiredTargetFramework>
4850
</Reference>
49-
<Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
50-
<SpecificVersion>False</SpecificVersion>
51-
<HintPath>..\redist\nunit.framework.dll</HintPath>
52-
</Reference>
5351
<Reference Include="System.Xml" />
5452
</ItemGroup>
5553
<ItemGroup>
@@ -73,6 +71,7 @@
7371
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
7472
</None>
7573
<EmbeddedResource Include="Resources\55.test" />
74+
<None Include="packages.config" />
7675
</ItemGroup>
7776
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
7877
<ItemGroup>

SGMLTests/packages.config

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="log4net" version="1.2.10" />
4+
<package id="NUnit" version="2.5.10.11092" />
5+
</packages>

SgmlReader.sln

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SgmlReaderDll", "sgmlreader
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SGMLTests", "SGMLTests\SGMLTests.csproj", "{9CC3FC29-375F-44F1-95BE-D52246CC7B3E}"
99
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F0869BE5-15C0-4F2D-A94A-5534163302A1}"
11+
ProjectSection(SolutionItems) = preProject
12+
build.ps1 = build.ps1
13+
default.ps1 = default.ps1
14+
SGMLReader.nuspec = SGMLReader.nuspec
15+
EndProjectSection
16+
EndProject
1017
Global
1118
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1219
Debug|Any CPU = Debug|Any CPU

build.ps1

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$buildDir = ".\build"
2+
if (test-path $buildDir) { ri -r -fo $buildDir }
3+
.\tools\psake\psake.ps1 default.ps1 Compile 2.0
4+
.\tools\psake\psake.ps1 default.ps1 Compile 4.0
5+
.\Tools\nuget\NuGet.exe pack .\SGMLReader.nuspec -BasePath $buildDir -OutputDirectory $buildDir

default.ps1

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
properties {
2+
$buildDir = ".\build"
3+
$outputDir = $buildDir + "\lib\" + $framework
4+
$out = $outputDir + "\SgmlReaderDll.dll"
5+
$nunitDir = (gci -fi NUnit* .\packages).FullName
6+
$nunit = (gci $nunitDir\Tools\nunit-console.exe)
7+
}
8+
9+
task default -depends Compile, Clean
10+
11+
task Init -depends Clean {
12+
mkdir $outputDir | out-null
13+
}
14+
15+
task Compile -depends Init {
16+
$sources = gci ".\sgmlreaderdll" -r -fi *.cs |% { $_.FullName }
17+
csc /target:library /out:$out $sources /keyfile:.\sgmlreaderdll\sgmlreader.snk
18+
}
19+
20+
task Test -depends Compile {
21+
. $nunit $out
22+
}
23+
24+
task Clean {
25+
if (test-path $outputDir) {
26+
ri -r -fo $outputDir
27+
}
28+
}

packages/NUnit.2.5.10.11092/Logo.ico

1.05 KB
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,277 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2+
<html>
3+
<body>
4+
<h1>NUnit Acceptance Tests</h1>
5+
<p>
6+
Developers love self-referential programs! Hence, NUnit has always run all it's
7+
own tests, even those that are not really unit tests.
8+
<p>Now, beginning with NUnit 2.4, NUnit has top-level tests using Ward Cunningham's
9+
FIT framework. At this time, the tests are pretty rudimentary, but it's a start
10+
and it's a framework for doing more.
11+
<h2>Running the Tests</h2>
12+
<p>Open a console or shell window and navigate to the NUnit bin directory, which
13+
contains this file. To run the test under Microsoft .Net, enter the command
14+
<pre> runFile NUnitFitTests.html TestResults.html .</pre>
15+
To run it under Mono, enter
16+
<pre> mono runFile.exe NUnitFitTests.html TestResults.html .</pre>
17+
Note the space and dot at the end of each command. The results of your test
18+
will be in TestResults.html in the same directory.
19+
<h2>Platform and CLR Version</h2>
20+
<table BORDER cellSpacing="0" cellPadding="5">
21+
<tr>
22+
<td colspan="2">NUnit.Fixtures.PlatformInfo</td>
23+
</tr>
24+
</table>
25+
<h2>Verify Unit Tests</h2>
26+
<p>
27+
Load and run the NUnit unit tests, verifying that the results are as expected.
28+
When these tests are run on different platforms, different numbers of tests may
29+
be skipped, so the values for Skipped and Run tests are informational only.
30+
<p>
31+
The number of tests in each assembly should be constant across all platforms -
32+
any discrepancy usually means that one of the test source files was not
33+
compiled on the platform. There should be no failures and no tests ignored.
34+
<p><b>Note:</b>
35+
At the moment, the nunit.extensions.tests assembly is failing because the
36+
fixture doesn't initialize addins in the test domain.
37+
<p>
38+
<table BORDER cellSpacing="0" cellPadding="5">
39+
<tr>
40+
<td colspan="6">NUnit.Fixtures.AssemblyRunner</td>
41+
</tr>
42+
<tr>
43+
<td>Assembly</td>
44+
<td>Tests()</td>
45+
<td>Run()</td>
46+
<td>Skipped()</td>
47+
<td>Ignored()</td>
48+
<td>Failures()</td>
49+
</tr>
50+
<tr>
51+
<td>nunit.framework.tests.dll</td>
52+
<td>397</td>
53+
<td>&nbsp;</td>
54+
<td>&nbsp;</td>
55+
<td>0</td>
56+
<td>0</td>
57+
</tr>
58+
<tr>
59+
<td>nunit.core.tests.dll</td>
60+
<td>355</td>
61+
<td>&nbsp;</td>
62+
<td>&nbsp;</td>
63+
<td>0</td>
64+
<td>0</td>
65+
</tr>
66+
<tr>
67+
<td>nunit.util.tests.dll</td>
68+
<td>238</td>
69+
<td>&nbsp;</td>
70+
<td>&nbsp;</td>
71+
<td>0</td>
72+
<td>0</td>
73+
</tr>
74+
<tr>
75+
<td>nunit.mocks.tests.dll</td>
76+
<td>43</td>
77+
<td>&nbsp;</td>
78+
<td>&nbsp;</td>
79+
<td>0</td>
80+
<td>0</td>
81+
</tr>
82+
<tr>
83+
<td>nunit.extensions.tests.dll</td>
84+
<td>5</td>
85+
<td>&nbsp;</td>
86+
<td>&nbsp;</td>
87+
<td>0</td>
88+
<td>0</td>
89+
</tr>
90+
<tr>
91+
<td>nunit-console.tests.dll</td>
92+
<td>40</td>
93+
<td>&nbsp;</td>
94+
<td>&nbsp;</td>
95+
<td>0</td>
96+
<td>0</td>
97+
</tr>
98+
<tr>
99+
<td>nunit.uikit.tests.dll</td>
100+
<td>34</td>
101+
<td>&nbsp;</td>
102+
<td>&nbsp;</td>
103+
<td>0</td>
104+
<td>0</td>
105+
</tr>
106+
<tr>
107+
<td>nunit-gui.tests.dll</td>
108+
<td>15</td>
109+
<td>&nbsp;</td>
110+
<td>&nbsp;</td>
111+
<td>0</td>
112+
<td>0</td>
113+
</tr>
114+
<tr>
115+
<td>nunit.fixtures.tests.dll</td>
116+
<td>6</td>
117+
<td>&nbsp;</td>
118+
<td>&nbsp;</td>
119+
<td>0</td>
120+
<td>0</td>
121+
</tr>
122+
</table>
123+
<h2>Code Snippet Tests</h2>
124+
<p>
125+
These tests create a test assembly from a snippet of code and then load and run
126+
the tests that it contains, verifying that the structure of the loaded tests is
127+
as expected and that the number of tests run, skipped, ignored or failed is
128+
correct.
129+
<p>
130+
<table BORDER cellSpacing="0" cellPadding="5">
131+
<tr>
132+
<td colspan="6">NUnit.Fixtures.SnippetRunner</td>
133+
</tr>
134+
<tr>
135+
<td>Code</td>
136+
<td>Tree()</td>
137+
<td>Run()</td>
138+
<td>Skipped()</td>
139+
<td>Ignored()</td>
140+
<td>Failures()</td>
141+
</tr>
142+
<tr>
143+
<td><pre>public class TestClass
144+
{
145+
}</pre>
146+
</td>
147+
<td>EMPTY</td>
148+
<td>0</td>
149+
<td>0</td>
150+
<td>0</td>
151+
<td>0</td>
152+
</tr>
153+
<tr>
154+
<td><pre>using NUnit.Framework;
155+
156+
[TestFixture]
157+
public class TestClass
158+
{
159+
}</pre>
160+
</td>
161+
<td>TestClass</td>
162+
<td>0</td>
163+
<td>0</td>
164+
<td>0</td>
165+
<td>0</td>
166+
</tr>
167+
<tr>
168+
<td><pre>using NUnit.Framework;
169+
170+
[TestFixture]
171+
public class TestClass
172+
{
173+
[Test]
174+
public void T1() { }
175+
[Test]
176+
public void T2() { }
177+
[Test]
178+
public void T3() { }
179+
}</pre>
180+
</td>
181+
<td><pre>TestClass
182+
&gt;T1
183+
&gt;T2
184+
&gt;T3</pre>
185+
</td>
186+
<td>3</td>
187+
<td>0</td>
188+
<td>0</td>
189+
<td>0</td>
190+
</tr>
191+
<tr>
192+
<td><pre>using NUnit.Framework;
193+
194+
[TestFixture]
195+
public class TestClass1
196+
{
197+
[Test]
198+
public void T1() { }
199+
}
200+
201+
[TestFixture]
202+
public class TestClass2
203+
{
204+
[Test]
205+
public void T2() { }
206+
[Test]
207+
public void T3() { }
208+
}</pre>
209+
</td>
210+
<td><pre>TestClass1
211+
&gt;T1
212+
TestClass2
213+
&gt;T2
214+
&gt;T3</pre>
215+
</td>
216+
<td>3</td>
217+
<td>0</td>
218+
<td>0</td>
219+
<td>0</td>
220+
</tr>
221+
<tr>
222+
<td><pre>using NUnit.Framework;
223+
224+
[TestFixture]
225+
public class TestClass
226+
{
227+
[Test]
228+
public void T1() { }
229+
[Test, Ignore]
230+
public void T2() { }
231+
[Test]
232+
public void T3() { }
233+
}</pre>
234+
</td>
235+
<td><pre>TestClass
236+
&gt;T1
237+
&gt;T2
238+
&gt;T3</pre>
239+
</td>
240+
<td>2</td>
241+
<td>0</td>
242+
<td>1</td>
243+
<td>0</td>
244+
</tr>
245+
<tr>
246+
<td><pre>using NUnit.Framework;
247+
248+
[TestFixture]
249+
public class TestClass
250+
{
251+
[Test]
252+
public void T1() { }
253+
[Test, Explicit]
254+
public void T2() { }
255+
[Test]
256+
public void T3() { }
257+
}</pre>
258+
</td>
259+
<td><pre>TestClass
260+
&gt;T1
261+
&gt;T2
262+
&gt;T3</pre>
263+
</td>
264+
<td>2</td>
265+
<td>1</td>
266+
<td>0</td>
267+
<td>0</td>
268+
</tr>
269+
</table>
270+
<h2>Summary Information</h2>
271+
<table BORDER cellSpacing="0" cellPadding="5">
272+
<tr>
273+
<td colspan="2">fit.Summary</td>
274+
</tr>
275+
</table>
276+
</body>
277+
</html>

0 commit comments

Comments
 (0)