Skip to content

CsharpPlugin tests #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 73 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
44bca8f
Some tests of CSharpPlugin
May 14, 2020
e6ba6e8
Fixed PassingProject & Added FailingProject
May 14, 2020
9aeb3e3
Merge branch 'master' into CSharpTests
May 15, 2020
7adfb77
Fixed test projects & set test env
May 16, 2020
5e32d1a
Merge branch 'master' into CSharpTests
May 16, 2020
767134a
Configured checkstyle in the tests
May 16, 2020
ed73554
more tests
May 18, 2020
5abed7c
Merge branch 'master' into CSharpTests
May 19, 2020
c22c8b2
tests for CSharpStudentFilePolicy
May 19, 2020
f1afe5b
tried to make travis download csharp-runner to run the tests
PPeltola May 19, 2020
e4a58b0
Merge branch 'CSharpTests' of github.com:TMC-C/tmc-langs into CSharpT…
PPeltola May 19, 2020
6f8ac85
fixed tests (i hope)
PPeltola May 19, 2020
d802d06
tried to make travis install dotnet
PPeltola May 20, 2020
c000940
fix checkstyle(?)
PPeltola May 20, 2020
de6fb58
lets break travis for science!
PPeltola May 20, 2020
7da27f7
CsharpExerciseDescParser tests
May 20, 2020
12ebe60
perhaps mr travis would like an another way to install dotnet
PPeltola May 20, 2020
d851cbb
fixed descParserTest
May 20, 2020
3feb903
Merge branch 'CSharpTests' of github.com:TMC-C/tmc-langs into CSharpT…
May 20, 2020
da3a7b0
fixed tests
May 20, 2020
cd9f2c8
changed dotnet instal method to the obvious one
PPeltola May 20, 2020
4af30d0
Merge branch 'CSharpTests' of github.com:TMC-C/tmc-langs into CSharpT…
PPeltola May 20, 2020
c9a96e6
fixed checkstyle
May 20, 2020
cab4fef
added travis install steps to hopefully install dotnet
PPeltola May 21, 2020
b9d93bb
Merge branch 'CSharpTests' of github.com:TMC-C/tmc-langs into CSharpT…
PPeltola May 21, 2020
db47d3b
changed dotnet version to correct one
PPeltola May 21, 2020
e8a36ce
trying to fix travis dotnet installation ep. 74
PPeltola May 21, 2020
4e80804
trying to fix travis dotnet installation ep. 75
PPeltola May 21, 2020
dff62a4
changing ubuntu version, probably breaking stuff
PPeltola May 21, 2020
9c47934
update dotnet source
PPeltola May 21, 2020
222aeb4
update r-langs dependencies
PPeltola May 21, 2020
5e4f3e4
updated csharp-runner version
PPeltola May 21, 2020
afc1cd2
testing travis workaround
PPeltola May 21, 2020
d8309e6
i did a stupid before, fixed i think
PPeltola May 21, 2020
6adf996
Fixed the tar extracting to correct file (figuring this out only took…
PPeltola May 21, 2020
fd75976
try the automatic setting of msbuild path
PPeltola May 21, 2020
84bdfc2
didn't work, added back the manual path setting
PPeltola May 21, 2020
8e746ec
print path in tests
PPeltola May 21, 2020
e9a180d
removed unnecessary switches
PPeltola May 22, 2020
86d6d1f
make travis list dotnet path for debugging
PPeltola May 22, 2020
1aebac8
update travis msbuild path variable
PPeltola May 22, 2020
05e0efd
lets break this again for science
PPeltola May 22, 2020
07158d0
added debugging prints
PPeltola May 22, 2020
8450b32
more debug prints for tests
PPeltola May 22, 2020
e4fb277
fixed msbuild path version
PPeltola May 22, 2020
7df84dd
Print run results on failure
aromaa May 25, 2020
e0dee7d
Print something actually useaful from the RunResult
aromaa May 25, 2020
80ed1da
Try fixing Travis
aromaa May 26, 2020
f908ee3
Travis debugging
aromaa May 26, 2020
86b4ded
Try to fix Travis part 333
aromaa May 26, 2020
ba7a80f
lets try explicitly defining the msbuild path to be sure
PPeltola May 27, 2020
cd19b1e
Merge master
aromaa May 27, 2020
02b098b
make travis use the automatic runner downloading
PPeltola May 27, 2020
352a97b
fix and update the runner version download
PPeltola May 27, 2020
fb88800
added debug prints for travis debugging
PPeltola May 27, 2020
8ee01ef
Update runner version
aromaa May 27, 2020
cc407af
more plugin tests
Tubaias May 27, 2020
b8fbdbc
merge
Tubaias May 27, 2020
1531e93
tests that worked until the merge
Tubaias May 27, 2020
f86c5dd
Part 😫
aromaa May 28, 2020
8fc1986
🤨🤨🤨
aromaa May 28, 2020
17e6085
🤔
aromaa May 28, 2020
95f0f72
😵
aromaa May 28, 2020
a4bf82f
fixed tests
Tubaias May 28, 2020
ff79a6a
merge
Tubaias May 28, 2020
3960a7c
🥱
aromaa May 28, 2020
5288038
Merge branch 'CSharpTests' of https://github.com/TMC-C/tmc-langs into…
aromaa May 28, 2020
d2d8825
fixed checkstyle & made coveralls read jacoco
PPeltola May 28, 2020
b859576
check fixstyle
PPeltola May 28, 2020
47ccc47
Remove debug pritns from tests
aromaa May 28, 2020
a5b8cdc
fixed checkstyle
May 29, 2020
f34effd
removed unused config
May 29, 2020
9d3a750
resolved conflict
May 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -35,8 +38,11 @@ public CSharpPluginTest() {
@Before
public void setUp() {
this.csPlugin = new CSharpPlugin();
<<<<<<< HEAD
=======

System.setProperty("TEST_ENV", "TEST");
>>>>>>> master
}

@Test
Expand Down Expand Up @@ -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"));

Expand Down Expand Up @@ -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);
Expand All @@ -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
}
}