Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
22
Task/Bitmap/Java/bitmap-2.java
Normal file
22
Task/Bitmap/Java/bitmap-2.java
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.awt.Color;
|
||||
import org.junit.Test;
|
||||
|
||||
public class BasicBitmapStorageTest {
|
||||
|
||||
@Test
|
||||
public void testHappy() {
|
||||
int width = 640;
|
||||
int height = 480;
|
||||
|
||||
BasicBitmapStorage bbs = new BasicBitmapStorage(width, height);
|
||||
bbs.fill(Color.CYAN);
|
||||
bbs.setPixel(width / 2, height / 2, Color.BLACK);
|
||||
Color c1 = bbs.getPixel(width / 2, height / 2);
|
||||
Color c2 = bbs.getPixel(20, 20);
|
||||
|
||||
assertEquals(Color.BLACK, c1);
|
||||
assertEquals(Color.CYAN, c2);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue