Skip to content

Commit

Permalink
Fixed nunit test exploration and some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeuchler committed Aug 20, 2020
1 parent 8f06f54 commit 92f4cbc
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 187 deletions.
Original file line number Diff line number Diff line change
@@ -1,91 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\..\..\packages\NUnit.3.12.0\build\NUnit.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{FD2AA3C3-F434-4D4F-88C8-3774B48E1D9D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Moryx.Communication.Sockets.IntegrationTests</RootNamespace>
<AssemblyName>Moryx.Communication.Sockets.IntegrationTests</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<TargetFramework>netcoreapp3.1</TargetFramework>
<ApplicationIcon />
<StartupObject />
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Compile Include="BinaryConnectionFactoryMock.cs" />
<Compile Include="CommunicationSocketsTestsBase.cs" />
<Compile Include="ConnectionBuffer.cs" />
<Compile Include="DelimiterProtocol\DelimiterCommunicationSocketTests.cs" />
<Compile Include="DelimiterProtocol\EndDelimiterOnlyInterpreter.cs" />
<Compile Include="DelimiterProtocol\HtmlInterpreter.cs" />
<Compile Include="DelimiterProtocol\TestDelimiterInterpreter.cs" />
<Compile Include="DelimiterProtocol\DelimiterInterpreterTests.cs" />
<Compile Include="CommunicationSocketsTests.cs" />
<Compile Include="DelimiterProtocol\TestDelimiterValidator.cs" />
<Compile Include="HeaderProtocol\HeaderedCommunicationSocketTests.cs" />
<Compile Include="HeaderProtocol\SystemTestValidator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="HeaderProtocol\SystemTestHeader.cs" />
<Compile Include="HeaderProtocol\SystemTestHeaderInterpreter.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Moryx\Moryx.csproj">
<Project>{437a03f2-1a35-41e1-a065-00debdda6e79}</Project>
<Name>Moryx</Name>
</ProjectReference>
<ProjectReference Include="..\..\Moryx.TestTools.UnitTest\Moryx.TestTools.UnitTest.csproj">
<Project>{505df475-5ff5-47cc-9e3b-bbe16c359f0e}</Project>
<Name>Moryx.TestTools.UnitTest</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Moryx.Communication.Sockets.IntegrationTests.csproj.DotSettings" />
<None Include="packages.config" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
</ItemGroup>

<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
<ProjectReference Include="..\..\Moryx\Moryx.csproj" />
<ProjectReference Include="..\..\Moryx.TestTools.UnitTest\Moryx.TestTools.UnitTest.csproj" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\NUnit.3.12.0\build\NUnit.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
3 changes: 2 additions & 1 deletion src/Tests/Moryx.Container.Tests/Moryx.Container.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<ApplicationIcon />
<StartupObject />
<DebugType>full</DebugType>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/Tests/Moryx.Container.Tests/OpenCoverFilter.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<ApplicationIcon />
<StartupObject />
<DebugType>full</DebugType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
Expand Down
111 changes: 16 additions & 95 deletions src/Tests/Moryx.Runtime.Tests/Moryx.Runtime.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,103 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\..\..\packages\NUnit.3.12.0\build\NUnit.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7448728C-9965-4874-A2E9-7BAB37E42963}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Moryx.Runtime.Tests</RootNamespace>
<AssemblyName>Moryx.Runtime.Tests</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<TargetFramework>netcoreapp3.1</TargetFramework>
<ApplicationIcon />
<StartupObject />
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Castle.Core.4.4.1\lib\net45\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.14.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Moq.4.14.5\lib\net45\Moq.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Helper.cs" />
<Compile Include="Mocks\TestLoggerMgmt.cs" />
<Compile Include="ModuleBaseTest.cs" />
<Compile Include="Modules\DelayedExceptionModule.cs" />
<Compile Include="Modules\TestModule.cs" />
<Compile Include="Properties\Annotations.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StateTransitionTest.cs" />
<Compile Include="Strategy.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Moryx\Moryx.csproj">
<Project>{7CD728A5-8FDD-4178-9CA4-3CD37512DA24}</Project>
<Name>Moryx</Name>
</ProjectReference>
<ProjectReference Include="..\..\Moryx.Runtime.Kernel\Moryx.Runtime.Kernel.csproj">
<Project>{8ff77f62-43c3-40fe-9dfe-01a53fe8a68e}</Project>
<Name>Moryx.Runtime.Kernel</Name>
</ProjectReference>
<ProjectReference Include="..\..\Moryx.Runtime\Moryx.Runtime.csproj">
<Project>{92777e64-9978-40ae-8b90-93ecbbbefe67}</Project>
<Name>Moryx.Runtime</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
</ItemGroup>

<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<ProjectReference Include="..\..\Moryx.Runtime\Moryx.Runtime.csproj" />
<ProjectReference Include="..\..\Moryx.Runtime.Kernel\Moryx.Runtime.Kernel.csproj" />
<ProjectReference Include="..\..\Moryx.TestTools.UnitTest\Moryx.TestTools.UnitTest.csproj" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\NUnit.3.12.0\build\NUnit.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class CustomAttributeProviderExtensionTests
[System.ComponentModel.Description("Tests if the GetDisplayName extension returns the correct display name")]
[TestCase(typeof(ClassDisplayAttributeDummy))]
[TestCase(typeof(DotnetAttributesDummy))]
public void ClassDisplayAttribute(Type target)
public void GetDisplayNameFromAttribute(Type target)
{
// Act
var displayName = target.GetDisplayName();
Expand All @@ -44,7 +44,7 @@ public void ClassDisplayAttribute(Type target)
[System.ComponentModel.Description("Tests if the GetDescription extension returns the correct description")]
[TestCase(typeof(ClassDisplayAttributeDummy))]
[TestCase(typeof(DotnetAttributesDummy))]
public void ClassDescriptionAttrbute(Type target)
public void GetDescriptionFromAttribute(Type target)
{
// Act
var description = target.GetDescription();
Expand Down
1 change: 1 addition & 0 deletions src/Tests/Moryx.Tests/Moryx.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<TargetFramework>netcoreapp3.0</TargetFramework>
<ApplicationIcon />
<StartupObject />
<DebugType>full</DebugType>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions src/Tests/Moryx.Tests/Serialization/SerializationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ public void AddEntry(CollectionType type, int prefill, int newValues)
// change "Value"
newInstance.SubEntries[0].Value.Current = (prefill + i).ToString("F2", defaultSerialization.FormatProvider);
newInstance.SubEntries[1].Value.Current = newInstance.SubEntries[1].Value.Possible[2];
newInstance.Identifier = "Some initial identifier";

colEntry.SubEntries.Add(newInstance);
}
Expand All @@ -371,7 +370,6 @@ public void AddEntry(CollectionType type, int prefill, int newValues)
var newInstance = colEntry.Prototypes[0].Instantiate();
newInstance.SubEntries[0].Value.Current = (prefill + i).ToString();
newInstance.SubEntries[1].Value.Current = newInstance.SubEntries[1].Value.Possible[2];
newInstance.Identifier = "Some initial identifier";
colEntry.SubEntries.Add(newInstance);
}
}
Expand Down Expand Up @@ -538,7 +536,6 @@ public void CreateInstance()
var newInstance = colEntry.Prototypes[0].Instantiate();
newInstance.SubEntries[0].Value.Current = j.ToString("F2", defaultSerialization.FormatProvider);
newInstance.SubEntries[1].Value.Current = newInstance.SubEntries[1].Value.Possible[1];
newInstance.Identifier = "Some initial identifier";
colEntry.SubEntries.Add(newInstance);
}

Expand Down

0 comments on commit 92f4cbc

Please sign in to comment.