Permalink
Browse files

Added packages to build.gradle for testing

  • Loading branch information...
elizarg committed Nov 24, 2018
1 parent 9c86a3c commit 23b40d2499be7ceb38830b95130a6bb744f7a614
Showing with 53 additions and 0 deletions.
  1. +6 −0 .classpath
  2. +13 −0 .vscode/tasks.json
  3. +19 −0 build.gradle
  4. +15 −0 src/test/java/org/usfirst/frc/team1700/robot/teleopTest/teleopTest1.java
@@ -6,6 +6,12 @@
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="src/test/java">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
@@ -0,0 +1,13 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "test",
"type": "shell",
"command": "./gradlew --rerun-tasks build",
"group": "test"
}
]
}
@@ -1,8 +1,24 @@
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.3'
}
}
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2019.0.0-alpha-3"
}

repositories {
mavenLocal()
mavenCentral()
}

apply plugin: 'org.junit.platform.gradle.plugin'

def ROBOT_CLASS = "org.usfirst.frc.team1700.robot.Robot"

// Define my targets (RoboRIO) and artifacts (deployable files)
@@ -32,8 +48,11 @@ dependencies {
compile wpilib()
compile ctre()
compile navx()
testCompile("org.junit.jupiter:junit-jupiter-api:5.0.3")
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.0.3")
}


// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
// in order to make them all available at runtime. Also adding the manifest so WPILib
// knows where to look for our Robot Class.
@@ -0,0 +1,15 @@
package org.usfirst.frc.team1700.robot.teleopTest;

import org.junit.jupiter.api.Test;
import org.usfirst.frc.team1700.robot.Robot;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class teleopTest1 {
// Robot.robotInit();

@Test
public void testFun(){
System.out.println("This works");

}
}

0 comments on commit 23b40d2

Please sign in to comment.