[gbrainy] Allows executing unit tests using nunit Monodevelop plugin and command line
- From: Jordi Mas <jmas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gbrainy] Allows executing unit tests using nunit Monodevelop plugin and command line
- Date: Mon, 7 Mar 2011 12:45:23 +0000 (UTC)
commit 4dd94db71949acf4b19d5468ec6fa092667bceb1
Author: Jordi Mas <jmas softcatala org>
Date: Mon Mar 7 13:47:08 2011 +0100
Allows executing unit tests using nunit Monodevelop plugin and command line
tests/Core/AnalogiesFactoryTest.cs | 2 +-
tests/Makefile.am | 20 ++++++++++++++++----
tests/TestSupport/UnitTestSupport.cs | 2 +-
tests/UnitTests.csproj | 8 ++++++++
4 files changed, 26 insertions(+), 6 deletions(-)
---
diff --git a/tests/Core/AnalogiesFactoryTest.cs b/tests/Core/AnalogiesFactoryTest.cs
index aef2bf7..ebcaa6a 100644
--- a/tests/Core/AnalogiesFactoryTest.cs
+++ b/tests/Core/AnalogiesFactoryTest.cs
@@ -36,7 +36,7 @@ namespace gbrainyTest
}
[Test]
- public void MultipleOptionsWithIngore ()
+ public void MultipleOptionsWithIgnore ()
{
Dictionary <int, Analogy> analogies;
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 125220d..1bf71f0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -30,13 +30,18 @@ if ENABLE_TESTS
ASSEMBLIES = \
$(NUNIT_LIBS) \
$(MONO_ADDINS_LIBS) \
- -r:../src/gbrainy.Core.dll \
- -r:../src/gbrainy.exe
+ -r:gbrainy.Core.dll \
+ -r:gbrainy.exe
MONO_PATH = .:$(top_builddir)/src:
RESSOURCES =
+COPY_FILES:
+ cp ../src/gbrainy.Core.dll .
+ cp ../src/gbrainy.exe .
+ cp ../src/gbrainy.Games.dll .
+
$(CORE): $(CSFILES_CORE) $(top_builddir)/src/gbrainy.exe
$(CSC) -out:$@ $(CSFLAGS) $(CSFILES_CORE) $(ASSEMBLIES) $(RESSOURCES)
@@ -46,9 +51,9 @@ $(CLASSICAL): $(CSFILES_CLASSICAL) $(top_builddir)/src/gbrainy.exe
$(GAMES): $(CSFILES_GAMES) $(top_builddir)/src/gbrainy.exe
$(CSC) -out:$@ $(CSFLAGS) $(CSFILES_GAMES) $(ASSEMBLIES) -r:../src/gbrainy.Games.dll $(RESSOURCES)
-all: $(CORE) $(CLASSICAL) $(GAMES)
+all: COPY_FILES $(CORE) $(CLASSICAL) $(GAMES)
-run: $(CORE) $(CLASSICAL) $(GAMES)
+run: COPY_FILES $(CORE) $(CLASSICAL) $(GAMES)
MONO_PATH=$(MONO_PATH) $(NUNIT) $(CLASSICAL) -nologo
MONO_PATH=$(MONO_PATH) $(NUNIT) $(CORE) -nologo
MONO_PATH=$(MONO_PATH) $(NUNIT) $(GAMES) -nologo
@@ -64,6 +69,13 @@ CLEANFILES = \
$(CORE).mdb \
$(CLASSICAL) \
$(CLASSICAL).mdb \
+ $(GAMES) \
+ $(GAMES).mdb \
+ gbrainy.Core.dll \
+ gbrainy.exe \
+ gbrainy.Games.dll \
+ PlayerHistory.xml \
TestResult.xml
+
.PHONY: test
diff --git a/tests/TestSupport/UnitTestSupport.cs b/tests/TestSupport/UnitTestSupport.cs
index 3338edc..90d7535 100644
--- a/tests/TestSupport/UnitTestSupport.cs
+++ b/tests/TestSupport/UnitTestSupport.cs
@@ -34,7 +34,7 @@ namespace gbrainyTest
ServiceLocator.Instance.RegisterService <IConfiguration> (new MemoryConfiguration ());
// Configuration
- ServiceLocator.Instance.GetService <IConfiguration> ().Set (ConfigurationKeys.AssembliesDir, "../src/");
+ ServiceLocator.Instance.GetService <IConfiguration> ().Set (ConfigurationKeys.AssembliesDir, ".");
}
}
}
diff --git a/tests/UnitTests.csproj b/tests/UnitTests.csproj
index d18a000..9db905c 100644
--- a/tests/UnitTests.csproj
+++ b/tests/UnitTests.csproj
@@ -72,4 +72,12 @@
<Name>Games</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <None Include="test_analogies.xml">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
+ <None Include="test_games.xml">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
+ </ItemGroup>
</Project>
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]