Skip to content

Commit 720c83d

Browse files
committed
Makes StateMachine a portable library
Minor refactorings Tests have their own project now Removes the need to have NUnit library in the distributions
1 parent 65abed6 commit 720c83d

39 files changed

+1501
-90
lines changed

MonoGameStateMachine/MonoGameStateMachine.csproj

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
<Compile Include="DataObject.cs" />
4545
<Compile Include="Timer.cs" />
4646
<Compile Include="Fsm.cs" />
47-
<Compile Include="NUnitTests\FluentTests.cs" />
4847
<Compile Include="Properties\AssemblyInfo.cs" />
4948
<Compile Include="TimeUnit.cs" />
5049
<Compile Include="Api\TransitionFluent.cs" />
@@ -58,14 +57,6 @@
5857
<HintPath>..\packages\MonoGame.Framework.Portable.3.6.0.1625\lib\portable-net45+win8+wpa81\MonoGame.Framework.dll</HintPath>
5958
<Private>True</Private>
6059
</Reference>
61-
<Reference Include="nunit.framework, Version=3.8.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
62-
<HintPath>..\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll</HintPath>
63-
<Private>True</Private>
64-
</Reference>
65-
<Reference Include="StateMachine, Version=1.1.1.3, Culture=neutral, processorArchitecture=MSIL">
66-
<HintPath>..\packages\StateMachine.1.1.1.3\lib\net451\StateMachine.dll</HintPath>
67-
<Private>True</Private>
68-
</Reference>
6960
</ItemGroup>
7061
<ItemGroup>
7162
<None Include="app.config" />
@@ -74,6 +65,12 @@
7465
<ItemGroup>
7566
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
7667
</ItemGroup>
68+
<ItemGroup>
69+
<ProjectReference Include="..\StateMachine\StateMachine.csproj">
70+
<Project>{baeab06b-25d7-4d2a-b21d-4435c0db794c}</Project>
71+
<Name>StateMachine</Name>
72+
</ProjectReference>
73+
</ItemGroup>
7774
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
7875
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
7976
Other similar extension points exist, see Microsoft.Common.targets.

MonoGameStateMachine/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.9.0")]
36-
[assembly: AssemblyFileVersion("1.0.9.0")]
35+
[assembly: AssemblyVersion("1.1.2.1")]
36+
[assembly: AssemblyFileVersion("1.1.2.1")]

MonoGameStateMachine/packages.config

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22
<packages>
33
<package id="JetBrains.Annotations" version="11.1.0" targetFramework="net451" />
44
<package id="MonoGame.Framework.Portable" version="3.6.0.1625" targetFramework="portable45-net45+win8+wpa81" />
5-
<package id="NUnit" version="3.8.1" targetFramework="net451" />
6-
<package id="StateMachine" version="1.1.1.3" targetFramework="net451" />
75
</packages>

StateMachine/NUnitTests/FluentSyntaxTest1.cs renamed to NUnitTests/FluentSyntaxTest1.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@
2626
// ***************************************************************************
2727

2828
using System.Collections.Generic;
29+
using StateMachine;
2930
using StateMachine.Fluent.Api;
3031

31-
namespace StateMachine.NUnitTests
32+
namespace NUnitTests
3233
{
3334
class Spell
3435
{

StateMachine/NUnitTests/FluentTests.cs renamed to NUnitTests/FluentTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
// ***************************************************************************
2727

2828
using NUnit.Framework;
29+
using StateMachine;
2930

30-
namespace StateMachine.NUnitTests
31+
namespace NUnitTests
3132
{
3233
public class FluentTests
3334
{

StateMachine/NUnitTests/GameProgrammingPatterns1.cs renamed to NUnitTests/GameProgrammingPatterns1.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
// ***************************************************************************
2727

2828
using NUnit.Framework;
29+
using StateMachine;
2930

30-
namespace StateMachine.NUnitTests
31+
namespace NUnitTests
3132
{
3233
[TestFixture]
3334
[Category("StateMachine.GamingProgrammingPatterns")]

MonoGameStateMachine/NUnitTests/FluentTests.cs renamed to NUnitTests/MonoGame/FluentTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@
2727

2828
using System;
2929
using Microsoft.Xna.Framework;
30+
using MonoGameStateMachine;
3031
using NUnit.Framework;
3132

32-
namespace MonoGameStateMachine.NUnitTests
33+
namespace NUnitTests.MonoGame
3334
{
3435
public class FluentTests
3536
{

NUnitTests/NUnitTests.csproj

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{61DE316C-7E56-4CF1-8F1A-8D0B58FCFBA7}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>NUnitTests</RootNamespace>
11+
<AssemblyName>NUnitTests</AssemblyName>
12+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>true</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>false</Optimize>
19+
<OutputPath>bin\Debug\</OutputPath>
20+
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<ErrorReport>prompt</ErrorReport>
22+
<WarningLevel>4</WarningLevel>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25+
<DebugType>pdbonly</DebugType>
26+
<Optimize>true</Optimize>
27+
<OutputPath>bin\Release\</OutputPath>
28+
<DefineConstants>TRACE</DefineConstants>
29+
<ErrorReport>prompt</ErrorReport>
30+
<WarningLevel>4</WarningLevel>
31+
</PropertyGroup>
32+
<ItemGroup>
33+
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
34+
<HintPath>..\packages\MonoGame.Framework.Portable.3.6.0.1625\lib\portable-net45+win8+wpa81\MonoGame.Framework.dll</HintPath>
35+
</Reference>
36+
<Reference Include="nunit.framework, Version=3.9.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
37+
<HintPath>..\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll</HintPath>
38+
</Reference>
39+
<Reference Include="System" />
40+
<Reference Include="System.Core" />
41+
<Reference Include="System.Xml.Linq" />
42+
<Reference Include="System.Data.DataSetExtensions" />
43+
<Reference Include="Microsoft.CSharp" />
44+
<Reference Include="System.Data" />
45+
<Reference Include="System.Net.Http" />
46+
<Reference Include="System.Xml" />
47+
</ItemGroup>
48+
<ItemGroup>
49+
<Compile Include="FluentSyntaxTest1.cs" />
50+
<Compile Include="FluentTests.cs" />
51+
<Compile Include="GameProgrammingPatterns1.cs" />
52+
<Compile Include="MonoGame\FluentTests.cs" />
53+
<Compile Include="Properties\AssemblyInfo.cs" />
54+
<Compile Include="SimpleTests.cs" />
55+
<Compile Include="TestTools.cs" />
56+
</ItemGroup>
57+
<ItemGroup>
58+
<None Include="app.config" />
59+
<None Include="packages.config" />
60+
</ItemGroup>
61+
<ItemGroup>
62+
<ProjectReference Include="..\MonoGameStateMachine\MonoGameStateMachine.csproj">
63+
<Project>{a1ad3096-ccdb-4b43-9104-295b7f59f3d3}</Project>
64+
<Name>MonoGameStateMachine</Name>
65+
</ProjectReference>
66+
<ProjectReference Include="..\StateMachine\StateMachine.csproj">
67+
<Project>{baeab06b-25d7-4d2a-b21d-4435c0db794c}</Project>
68+
<Name>StateMachine</Name>
69+
</ProjectReference>
70+
</ItemGroup>
71+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
72+
</Project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("NUnitTests")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("NUnitTests")]
13+
[assembly: AssemblyCopyright("Copyright © 2018")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("61de316c-7e56-4cf1-8f1a-8d0b58fcfba7")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

StateMachine/NUnitTests/SimpleTests.cs renamed to NUnitTests/SimpleTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727

2828
using System.Linq;
2929
using NUnit.Framework;
30+
using StateMachine;
3031

31-
namespace StateMachine.NUnitTests
32+
namespace NUnitTests
3233
{
3334
[TestFixture]
3435
[Category("StateMachine.Simple")]

0 commit comments

Comments
 (0)