-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPictureTester.java
107 lines (96 loc) · 2.62 KB
/
PictureTester.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
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
/**
* This class contains class (static) methods
* that will help you test the Picture class
* methods. Uncomment the methods and the code
* in the main to test.
*
* @author Barbara Ericson
*/
public class PictureTester
{
/** Method to test zeroBlue */
public static void testZeroBlue()
{
Picture beach = new Picture("beach.jpg");
beach.explore();
beach.zeroBlue();
beach.explore();
}
public static void testKeepOnlyBlue(){
Picture beach = new Picture("beach.jpg");
beach.keepOnlyBlue();
beach.explore();
}
public static void testNegate(){
Picture beach = new Picture("beach.jpg");
beach.negate();
beach.explore();
}
public static void testGrayscale(){
Picture beach = new Picture("Kevin.jpg");
beach.grayscale();
beach.explore();
}
public static void testFixUnderwater(){
Picture beach = new Picture("water.jpg");
beach.fixUnderwater();
beach.explore();
}
/** Method to test mirrorVertical */
public static void testMirrorVertical()
{
Picture caterpillar = new Picture("caterpillar.jpg");
caterpillar.explore();
caterpillar.mirrorVertical();
caterpillar.explore();
}
public static void testMirrorHorizontalBotToTop(){
Picture alex = new Picture("Alex.jpg");
alex.mirrorHorizontalBotToTop();
alex.explore();
}
/** Method to test mirrorTemple */
public static void testMirrorTemple()
{
Picture temple = new Picture("temple.jpg");
temple.explore();
temple.mirrorTemple();
temple.explore();
}
/** Method to test the collage method */
public static void testCollage()
{
Picture canvas = new Picture("640x480.jpg");
canvas.createCollage();
canvas.explore();
}
public static void testCreateSeatingChart(){
Picture canvas = new Picture("640x480.jpg");
canvas.createSeatingChart();
canvas.explore();
}
/** Method to test edgeDetection */
public static void testEdgeDetection()
{
Picture swan = new Picture("swan.jpg");
swan.edgeDetection(10);
swan.explore();
}
/** Main method for testing. Every class can have a main
* method in Java */
public static void main(String[] args)
{
// uncomment a call here to run a test
// and comment out the ones you don't want
// to run
//testZeroBlue();
//testKeepOnlyBlue();
//testNegate();
//testGrayscale();
//testFixUnderwater();
//testMirrorVertical();
//testMirrorHorizontalBotToTop();
//testCollage();
testCreateSeatingChart();
}
}