Began restoring the unit tests (and porting any usages of NMock to NSubstitute)

This commit is contained in:
cygon 2024-07-24 14:10:08 +02:00
parent 6028e84509
commit 56c6b649a7
16 changed files with 46 additions and 58 deletions

View File

@ -7,6 +7,7 @@
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<AssemblyName>Nuclex.Support</AssemblyName>
<RootNamespace>Nuclex.Support</RootNamespace>
<IntermediateOutputPath>obj\source</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>

View File

@ -0,0 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<AssemblyName>Nuclex.Support.Tests</AssemblyName>
<RootNamespace>Nuclex.Support.Tests</RootNamespace>
<IntermediateOutputPath>obj\tests</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Source\**" />
<EmbeddedResource Remove="Source\**" />
<None Remove="Source\**" />
</ItemGroup>
<ItemGroup>
<None Remove=".git" />
<None Remove="packages.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NSubstitute" Version="5.1.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="Nuclex.Support (netstandard-2.0).csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="Castle.Core">
<HintPath>..\third-party\castle.core-5.1.1\netstandard-2.0\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="NSubstitute">
<HintPath>..\third-party\nsubstitute-5.1.0\netstandard-2.0\NSubstitute.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\third-party\nunit-3.14.0\netstandard-2.0\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

View File

@ -17,8 +17,6 @@ limitations under the License.
*/
#endregion // Apache License 2.0
#if UNITTEST
using System;
using System.IO;
@ -119,5 +117,3 @@ namespace Nuclex.Support {
}
} // namespace Nuclex.Support
#endif // UNITTEST

View File

@ -17,8 +17,6 @@ limitations under the License.
*/
#endregion // Apache License 2.0
#if UNITTEST
using System;
using System.Collections.Generic;
@ -261,5 +259,3 @@ namespace Nuclex.Support {
}
} // namespace Nuclex.Support
#endif // UNITTEST

View File

@ -17,8 +17,6 @@ limitations under the License.
*/
#endregion // Apache License 2.0
#if UNITTEST
using System;
using System.Collections.Generic;
@ -125,5 +123,3 @@ namespace Nuclex.Support {
}
} // namespace Nuclex.Support
#endif // UNITTEST

View File

@ -17,8 +17,6 @@ limitations under the License.
*/
#endregion // Apache License 2.0
#if UNITTEST
using System;
using NUnit.Framework;
@ -86,5 +84,3 @@ namespace Nuclex.Support {
}
}
#endif // UNITTEST

View File

@ -17,13 +17,10 @@ limitations under the License.
*/
#endregion // Apache License 2.0
#if UNITTEST
using System;
using System.ComponentModel;
using NUnit.Framework;
using NMock;
namespace Nuclex.Support {
@ -167,5 +164,3 @@ namespace Nuclex.Support {
}
} // namespace Nuclex.Support
#endif // UNITTEST

View File

@ -20,8 +20,6 @@ limitations under the License.
using System;
using System.IO;
#if UNITTEST
using NUnit.Framework;
namespace Nuclex.Support {
@ -242,5 +240,3 @@ namespace Nuclex.Support {
}
} // namespace Nuclex.Support
#endif // UNITTEST

View File

@ -17,8 +17,6 @@ limitations under the License.
*/
#endregion // Apache License 2.0
#if UNITTEST
using System;
using System.ComponentModel;
@ -120,5 +118,3 @@ namespace Nuclex.Support {
}
} // namespace Nuclex.Support
#endif // UNITTEST

View File

@ -20,8 +20,6 @@ limitations under the License.
using System;
using System.IO;
#if UNITTEST
using NUnit.Framework;
namespace Nuclex.Support {
@ -64,5 +62,3 @@ namespace Nuclex.Support {
}
} // namespace Nuclex.Support
#endif // UNITTEST

View File

@ -17,8 +17,6 @@ limitations under the License.
*/
#endregion // Apache License 2.0
#if UNITTEST
using System;
using System.Collections.Generic;
using System.Text;
@ -370,5 +368,3 @@ namespace Nuclex.Support {
}
} // namespace Nuclex.Support
#endif // UNITTEST

View File

@ -20,8 +20,6 @@ limitations under the License.
using System;
using System.IO;
#if UNITTEST
using NUnit.Framework;
namespace Nuclex.Support {
@ -212,5 +210,3 @@ namespace Nuclex.Support {
}
} // namespace Nuclex.Support
#endif // UNITTEST

View File

@ -20,8 +20,6 @@ limitations under the License.
using System;
using System.IO;
#if UNITTEST
using NUnit.Framework;
namespace Nuclex.Support {
@ -207,5 +205,3 @@ namespace Nuclex.Support {
}
} // namespace Nuclex.Support
#endif // UNITTEST

View File

@ -17,8 +17,6 @@ limitations under the License.
*/
#endregion // Apache License 2.0
#if UNITTEST
using System;
using System.Reflection;
@ -88,7 +86,7 @@ namespace Nuclex.Support {
#region class HasIgnoreAttribute
/// <summary>Class that carries an IgnoreAttribute</summary>
[Ignore]
[Ignore("Just misusing NUnit's IgnoreAttribute to have an attribute to test against")]
private class HasIgnoreAttribute { }
#endregion // class HasIgnoreAttribute
@ -137,5 +135,3 @@ namespace Nuclex.Support {
}
} // namespace Nuclex.Support
#endif // UNITTEST

View File

@ -17,8 +17,6 @@ limitations under the License.
*/
#endregion // Apache License 2.0
#if UNITTEST
using System;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
@ -109,5 +107,3 @@ namespace Nuclex.Support {
}
} // namespace Nuclex.Support
#endif // UNITTEST

View File

@ -17,8 +17,6 @@ limitations under the License.
*/
#endregion // Apache License 2.0
#if UNITTEST
using System;
using System.IO;
using System.Text;
@ -309,5 +307,3 @@ namespace Nuclex.Support {
}
} // namespace Nuclex.Support
#endif // UNITTEST