Add UtilityTest Template

This commit is contained in:
Keenan D. Buckley
2020-04-11 12:39:53 -06:00
parent 3ad521ea9b
commit 8b081c8942
6 changed files with 47 additions and 70 deletions
-21
View File
@@ -1,21 +0,0 @@
# @see https://editorconfig-specification.readthedocs.io/en/latest/
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
charset = utf-8
# 4 space indentation
[*.py]
indent_style = space
indent_size = 4
# Tab indentation (no size specified)
[Makefile]
indent_style = tab
-29
View File
@@ -1,29 +0,0 @@
# @see https://git-scm.com/docs/gitignore
# `.DS_Store` is a file that stores custom attributes of its containing folder
.DS_Store
# Logs
logs
*.log
# Dependencies
node_modules
bower_components
vendor
# Caches
.cache
.npm
.eslintcache
# Temporaries
.tmp
.temp
# Built
dist
target
built
output
out
+47
View File
@@ -0,0 +1,47 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package frc4388.utility;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
import org.junit.*;
import edu.wpi.first.wpilibj.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
/**
* Add your docs here.
*/
public class UtilityTest {
@Test
public void testExample() {
// Arrange
boolean isFalse = false;
int i = 0;
double d = 0.0;
// Act
wait(1);
isFalse = !isFalse;
i++;
d -= Math.PI;
// Assert
assertEquals(1, i);
assertEquals(-Math.PI, d, 0.001);
assertEquals(true, isFalse);
}
private void wait(int millis) {
try {
Thread.sleep(millis);
} catch (Exception e) {}
}
}
@@ -1,12 +0,0 @@
import React from "react";
import classNames from "classnames/bind";
import styles from "./index.scss";
const cx = classNames.bind(styles);
function __templateNameToPascalCase__() {
return <div className={cx("__templateNameToParamCase__")}>Hello :)</div>;
}
export default __templateNameToPascalCase__;
@@ -1,3 +0,0 @@
.__templateNameToParamCase__ {
display: inline-block;
}
-5
View File
@@ -1,5 +0,0 @@
export default function __templateNameToPascalCase__() {
console.log("TemplateName -> __templateName__");
console.log("TemplateName to ParamCase -> __templateNameToParamCase__");
console.log("TemplateName to PascalCase -> __templateNameToPascalCase__");
}