Skip to content
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

Employee.java #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: java
jdk: openjdk14
cache:
directories: $HOME/.m2
notifications:
email:
recipients: [email protected]
on_failure: always
on_success: never
2 changes: 1 addition & 1 deletion src/employee_stuff/Employee.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class Employee {
private int number;
private float salary;
private float bonus;
private static final float MIN_SALARY = 7000f;
private static final float MIN_SALARY = 10000f;
private final float INITIAL_BONUS = 200f;
public static int instanceCount;

Expand Down
6 changes: 3 additions & 3 deletions src/test/java/EmployeeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ void testSalaryMinFailure() {
assertThrows(IllegalArgumentException.class, () -> {
e.setSalary(6999);
});
assertNotEquals(6999, e.getSalary());
assertNotEquals(9999, e.getSalary());
}

@Test
void testSalaryMinSuccess() {
Employee e = new Employee(15, "Henry Banana");
e.setSalary(7000);
assertEquals(7000, e.getSalary());
e.setSalary(10000);
assertEquals(10000, e.getSalary());
}
}