OSDN Git Service

1dde8bc211fededdee537a9da6ad2c4b5fcae791
[mikutoga/Vmd2XML.git] / src / test / java / jp / sfjp / mikutoga / vmd / model / CameraRotationTest.java
1 /*
2  */
3
4 package jp.sfjp.mikutoga.vmd.model;
5
6 import org.junit.After;
7 import org.junit.AfterClass;
8 import org.junit.Before;
9 import org.junit.BeforeClass;
10 import org.junit.Test;
11 import static org.junit.Assert.*;
12
13 /**
14  *
15  */
16 public class CameraRotationTest {
17
18     public CameraRotationTest() {
19     }
20
21     @BeforeClass
22     public static void setUpClass() {
23     }
24
25     @AfterClass
26     public static void tearDownClass() {
27     }
28
29     @Before
30     public void setUp() {
31     }
32
33     @After
34     public void tearDown() {
35     }
36
37     /**
38      * Test of get/set method, of class CameraRotation.
39      */
40     @Test
41     public void testGetSetParams() {
42         System.out.println("getLatitude");
43
44         CameraRotation rotation;
45
46         rotation = new CameraRotation();
47
48         assertEquals(0.0, rotation.getLatitude(), 0.0);
49         assertEquals(0.0, rotation.getLongitude(), 0.0);
50         assertEquals(0.0, rotation.getRoll(), 0.0);
51
52         rotation.setLatitude(1.0);
53         rotation.setLongitude(2.0);
54         rotation.setRoll(3.0);
55
56         assertEquals(1.0, rotation.getLatitude(), 0.0);
57         assertEquals(2.0, rotation.getLongitude(), 0.0);
58         assertEquals(3.0, rotation.getRoll(), 0.0);
59
60         return;
61     }
62
63     /**
64      * Test of toString method, of class CameraRotation.
65      */
66     @Test
67     public void testToString() {
68         System.out.println("toString");
69
70         CameraRotation rotation;
71
72         rotation = new CameraRotation();
73
74         assertEquals("latitude=0 longitude=0 roll=0", rotation.toString());
75
76         rotation.setLatitude(1.1f);
77         rotation.setLongitude(2.2f);
78         rotation.setRoll(3.3f);
79         assertEquals("latitude=1.1 longitude=2.2 roll=3.3", rotation.toString());
80
81         return;
82     }
83
84 }