File tree Expand file tree Collapse file tree
src/test/java/com/github/shitlib/java Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,4 +6,5 @@ before_install:
66 - wget -O ~/codacy-coverage-reporter-assembly-latest.jar $(curl https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r .assets[0].browser_download_url)
77
88after_success :
9- - java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r target/site/jacoco/jacoco.xml
9+ - java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r target/site/jacoco/jacoco.xml
10+ - bash <(curl -s https://codecov.io/bash)
Original file line number Diff line number Diff line change 22
33import org .junit .jupiter .api .Test ;
44
5- import static org .junit .jupiter .api .Assertions .*;
65import static com .github .shitlib .java .OhShit .*;
76import static org .assertj .core .api .Assertions .*;
87
@@ -19,32 +18,37 @@ public void ohShitClass() {
1918 }
2019
2120 @ Test
22- public void ohShitInteger1 () {
23- //TODO:
24- assertTrue (true );
21+ public void ohShitInteger () {
22+ assertThat (ohShit (1 )).isInstanceOf (Integer .class ).isEqualTo (1 );
2523 }
2624
2725 @ Test
28- public void ohShit2 () {
29- //TODO:
30- assertTrue (true );
26+ public void ohShitByte () {
27+ assertThat (ohShit ((byte ) 1 )).isInstanceOf (Byte .class ).isEqualTo ((byte ) 1 );
3128 }
3229
3330 @ Test
34- public void ohShit3 () {
35- //TODO:
36- assertTrue (true );
31+ public void ohShitLong () {
32+ assertThat (ohShit (1L )).isInstanceOf (Long .class ).isEqualTo (1L );
3733 }
3834
3935 @ Test
40- public void ohShit4 () {
41- //TODO:
42- assertTrue (true );
36+ public void ohShitBoolean () {
37+ assertThat (ohShit (true )).isInstanceOf (Boolean .class ).isEqualTo (true );
4338 }
4439
4540 @ Test
46- public void ohShit5 () {
47- //TODO:
48- assertTrue (true );
41+ public void ohShitString () {
42+ assertThat (ohShit ("a string" )).isInstanceOf (String .class ).isEqualTo ("a string" );
43+ }
44+
45+ @ Test
46+ public void ohShitNull () {
47+ assertThat (ohShit (null )).isNull ();
48+ }
49+
50+ @ Test
51+ public void ohShitCharacter () {
52+ assertThat (ohShit ('A' )).isInstanceOf (Character .class ).isEqualTo ('A' );
4953 }
5054}
You can’t perform that action at this time.
0 commit comments