diff --git a/tmc-langs-csharp/src/test/java/fi/helsinki/cs/tmc/langs/csharp/CSharpPluginTest.java b/tmc-langs-csharp/src/test/java/fi/helsinki/cs/tmc/langs/csharp/CSharpPluginTest.java index e5c88a95f..2547a96f0 100644 --- a/tmc-langs-csharp/src/test/java/fi/helsinki/cs/tmc/langs/csharp/CSharpPluginTest.java +++ b/tmc-langs-csharp/src/test/java/fi/helsinki/cs/tmc/langs/csharp/CSharpPluginTest.java @@ -4,7 +4,10 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; +<<<<<<< HEAD +======= import static org.junit.Assume.assumeTrue; +>>>>>>> master import fi.helsinki.cs.tmc.langs.abstraction.Strategy; import fi.helsinki.cs.tmc.langs.abstraction.ValidationResult; @@ -35,8 +38,11 @@ public CSharpPluginTest() { @Before public void setUp() { this.csPlugin = new CSharpPlugin(); +<<<<<<< HEAD +======= System.setProperty("TEST_ENV", "TEST"); +>>>>>>> master } @Test @@ -74,9 +80,12 @@ public void testJarPathExists() { @Test public void testDownloadingRunner() throws IOException { +<<<<<<< HEAD +======= //Hack for allowing tests to run just fine when on dev environment assumeTrue(System.getenv("TMC_CSHARP_BOOTSTRAP_PATH") == null); +>>>>>>> master Path jarPath = csPlugin.getJarPath(); Path dirPath = jarPath.resolve(Paths.get("tmc-csharp-runner")); @@ -168,6 +177,27 @@ public void testCheckCodeStyleStrategy() { @Test public void testCleanRemovesBinAndObj() throws IOException { +<<<<<<< HEAD + Path projectPath = TestUtils.getPath(getClass(), "PassingProject"); + + this.csPlugin.runTests(projectPath); + + assertTrue(Files.exists(projectPath.resolve(Paths.get("src", "PassingSample", "bin")))); + assertTrue(Files.exists(projectPath.resolve(Paths.get("src", "PassingSample", "obj")))); + assertTrue(Files.exists(projectPath.resolve( + Paths.get("test", "PassingSampleTests", "bin")))); + assertTrue(Files.exists(projectPath.resolve( + Paths.get("test", "PassingSampleTests", "obj")))); + + csPlugin.clean(projectPath); + + assertFalse(Files.exists(projectPath.resolve(Paths.get("src", "PassingSample", "bin")))); + assertFalse(Files.exists(projectPath.resolve(Paths.get("src", "PassingSample", "obj")))); + assertFalse(Files.exists(projectPath.resolve( + Paths.get("test", "PassingSampleTests", "bin")))); + assertFalse(Files.exists(projectPath.resolve( + Paths.get("test", "PassingSampleTests", "obj")))); +======= Path path = TestUtils.getPath(getClass(), "PassingProject"); this.csPlugin.runTests(path); @@ -183,5 +213,6 @@ public void testCleanRemovesBinAndObj() throws IOException { assertFalse(Files.exists(path.resolve(Paths.get("src", "PassingSample", "obj")))); assertFalse(Files.exists(path.resolve(Paths.get("test", "PassingSampleTests", "bin")))); assertFalse(Files.exists(path.resolve(Paths.get("test", "PassingSampleTests", "obj")))); +>>>>>>> master } }