-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestFindCustomers.java
More file actions
30 lines (29 loc) · 853 Bytes
/
TestFindCustomers.java
File metadata and controls
30 lines (29 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
File: TestFindCustomers.java
Author: Christina Leung
Description: Tests the functionalities of FindCustomers.java
*/
public class TestFindCustomers {
public static void testInRange() {
if (FindCustomers.inRange(100.0, 100.0)) {
System.out.println("inRange failed with vals (100, 100)");
return;
}
if (FindCustomers.inRange(0.0, 0.0)) {
System.out.println("inRange failed with vals (0, 0)");
return;
}
if (!FindCustomers.inRange(-122.5, 37.5)) {
System.out.println("inRange failed with vals (37.5, -122.5)");
return;
}
if (!FindCustomers.inRange(-122.0, 37.0)) {
System.out.println("inRange failed with vals (37.0, -122.0)");
return;
}
System.out.println("All inRange tests passed!");
}
public static void main(String[] args) {
testInRange();
}
}