-
Notifications
You must be signed in to change notification settings - Fork 1
/
ClientTest.java
61 lines (53 loc) · 2.18 KB
/
ClientTest.java
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// import java.util.*;
// class ClientTest {
// public static void main(String[] args)
// {
// System.out.println("TESTING ClientLIST");
// ClientList clientList = ClientList.instance();
// Client client1 = new Client("jose", "123 1234th Ave N", "123-456-7890");
// Client client2 = new Client("josh", "234 45th Ave S", "123-456-7891");
// Client client3 = new Client("jamal", "385 78th Ave E", "123-456-7892");
// Client client4 = new Client("kevin", "895 3th Ave W", "123-456-78903");
// Transaction transaction = new Transaction("test", 10);
// client1.setBalance(1);
// client2.setBalance(2);
// client3.setBalance(3);
// client4.setBalance(4);
// float newBalance = 9;
// String description1 = "test";
// float dollarAmount1 = 12;
// client1.createTransaction(description1, dollarAmount1);
// client1.addTransactionToList(transaction);
// String description2 = "test2";
// float dollarAmount2 = 13;
// client1.createTransaction(description2, dollarAmount2);
// client1.addTransactionToList(transaction);
// String description3 = "test3";
// float dollarAmount3 = 14;
// client2.createTransaction(description3, dollarAmount3);
// client2.addTransactionToList(transaction);
// //Tests insertClient()
// clientList.insertClient(client1);
// clientList.insertClient(client2);
// clientList.insertClient(client3);
// clientList.insertClient(client4);
// //Tests getClient()
// Iterator clientIterator = clientList.getClients();
// while (clientIterator.hasNext())
// {
// Client client = (Client)(clientIterator.next());
// System.out.println(client);
// }
// //Tests instance() to make sure list is the same
// ClientList clientList2 = ClientList.instance();
// Iterator clientIterator2 = clientList2.getClients();
// while (clientIterator2.hasNext())
// {
// Client client = (Client)(clientIterator2.next());
// newBalance++;
// System.out.println("final:" + client + client.getBalance());
// System.out.println(client.hasOutstandingBalance());
// System.out.println(client.getTransactions());
// }
// }
// }