GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unit Test · Jawads/JavaWeb@7c0156a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/test/java/mypackage
    • CalculatorTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/test/java/mypackage/CalculatorTest.java‎

Copy file name to clipboard
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package mypackage;
2+
3+
import org.junit.Test;
4+
import static org.hamcrest.CoreMatchers.is;
5+
import static org.junit.Assert.assertThat;
6+
7+
public class CalculatorTest {
8+
@Test
9+
public void twoAndThreeIsFive() throws Exception {
10+
final long result = new Calculator().addFucn(2, 3);
11+
assertThat(result, is(5L));
12+
}
13+
14+
@Test
15+
public void threeMinusTwoIsOne() throws Exception {
16+
final long result = new Calculator().subFucn(2, 3);
17+
assertThat(result, is(1L));
18+
}
19+
20+
@Test
21+
public void threeXThreeIsNine() throws Exception {
22+
final long result = new Calculator().mulFucn(3, 3);
23+
assertThat(result, is(9L));
24+
}
25+
26+
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.