Added classes DrawingBoard, Particle and ParticleTest.
[desert.git] / test / org / sourceforge / astei / desert / ParticleTest.java
blobe51b0dd247b2b08ffd07356d9dc92bdddefc6b19
1 /*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
6 package org.sourceforge.astei.desert;
8 import org.junit.Test;
9 import static org.junit.Assert.*;
11 /**
13 * @author codistmonk (creation 2010-04-13)
15 public final class ParticleTest {
17 @Test
18 public final void testUpdate() {
19 final Particle particle = new Particle(0.0, 2.0, 3.0, 5.0);
21 particle.update(7.0);
23 assertEquals(21.0, particle.getX(), DELTA);
24 assertEquals(37.0, particle.getY(), DELTA);
25 assertEquals(3.0, particle.getSpeedX(), DELTA);
26 assertEquals(5.0, particle.getSpeedY(), DELTA);
29 private static final Double DELTA = 1e-42;