Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
112 lines (96 loc) · 2.84 KB

File metadata and controls

112 lines (96 loc) · 2.84 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.platform.commons.function.Try;
import java.util.Optional;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.platform.commons.util.ReflectionUtils.tryToLoadClass;
public class FinanceTest {
private final String classToFind = "Finance";
public Optional<Class<?>> getAppClass() {
Try<Class<?>> aClass = tryToLoadClass(classToFind);
return aClass.toOptional();
}
@Test
public void assertClassExistence() {
final Optional<Class<?>> maybeClass = getAppClass();
assertTrue(maybeClass.isPresent(), classToFind + " should be present");
assertEquals(classToFind, maybeClass.get().getCanonicalName());
}
@Disabled
@Test
public void testCommandsToUsage() {
/*
* 1. Existence of field
* 2. isPublic, isFinal, isStatic, isMap (type)
* 3. Has 3 entries
* 4. Test all entries
*/
}
@Disabled
@Test
public void testMainCommandInput() {
/*
* 1. Pass command from the commandsToUsage
* 2. Test invalid command
*/
}
@Disabled
@Test
public void testValidateCommandArgumentsExistence() {
/*
* 1. Method exists
* 2. isStatic, isPrivate, returns boolean
* 3. accepts String[] parameter
*/
}
@Disabled
@Test
public void testValidateCommandArgumentsCorrectness() {
/*
* 1. Send all 3 valid argument[0] with different rest of argument length
* 2. Send invalid args[0] and assert that it should return false;
*/
}
@Disabled
@Test
public void testMainWithValidCommandInvalidUsage() {
/*
* 1. test all valid command names with invalid arguments lengths
*/
}
@Disabled
@Test
public void testCommandConstantFields() {
/*
* 1. Existence of BEST_LOAN_RATES, SAVINGS_CALCULATOR, MORTGAGE_CALCULATOR
* 2. isPublic, isStatic, isFinal
* 3. Right values for each field
*/
}
@Disabled
@Test
public void testExecuteCommandExistence() {
/*
* 1. Method exists
* 2. isPrivate isStatic, returns nothing
* 3. Has parameters
*/
}
@Disabled
@Test
public void testExecuteCommandExistenceForCorrectness() {
/*
* 1. Test the validity for correct statement printed on console based on command
*/
}
@Disabled
@Test
public void testMainWithValidCommandUsage() {
/*
* 1. Test with bestLoanRates 1
* 2. Test with savingsCalculator 20.0,30.0 10.0,5.0
* 3. Test with mortgageCalculator 264000 30 3.74f
*/
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.