jtulach@43
|
1 |
/**
|
jtulach@43
|
2 |
* The MIT License (MIT)
|
jtulach@43
|
3 |
*
|
jtulach@43
|
4 |
* Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
|
jtulach@43
|
5 |
*
|
jtulach@43
|
6 |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
jtulach@43
|
7 |
* of this software and associated documentation files (the "Software"), to deal
|
jtulach@43
|
8 |
* in the Software without restriction, including without limitation the rights
|
jtulach@43
|
9 |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
jtulach@43
|
10 |
* copies of the Software, and to permit persons to whom the Software is
|
jtulach@43
|
11 |
* furnished to do so, subject to the following conditions:
|
jtulach@43
|
12 |
*
|
jtulach@43
|
13 |
* The above copyright notice and this permission notice shall be included in
|
jtulach@43
|
14 |
* all copies or substantial portions of the Software.
|
jtulach@43
|
15 |
*
|
jtulach@43
|
16 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
jtulach@43
|
17 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
jtulach@43
|
18 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
jtulach@43
|
19 |
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
jtulach@43
|
20 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
jtulach@43
|
21 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
jtulach@43
|
22 |
* THE SOFTWARE.
|
jtulach@43
|
23 |
*/
|
jtulach@43
|
24 |
package org.apidesign.demo.spinningcube;
|
jtulach@43
|
25 |
|
jtulach@84
|
26 |
import java.util.List;
|
jtulach@43
|
27 |
import static org.testng.Assert.*;
|
jtulach@43
|
28 |
import org.testng.annotations.Test;
|
jtulach@43
|
29 |
|
jtulach@43
|
30 |
public class DataModelTest {
|
jtulach@43
|
31 |
@Test public void areHelloWorldTwoWords() {
|
jtulach@43
|
32 |
Data model = new Data();
|
jtulach@43
|
33 |
model.setMessage("Hello World!");
|
jtulach@43
|
34 |
|
jtulach@84
|
35 |
List<String> arr = model.getSides();
|
jtulach@84
|
36 |
assertEquals(arr.size(), 6, "Cube has six sides");
|
jtulach@84
|
37 |
assertEquals("Hello", arr.get(0), "Hello is the first word");
|
jtulach@84
|
38 |
assertEquals("World!", arr.get(1), "World is the second word");
|
jtulach@43
|
39 |
}
|
jtulach@43
|
40 |
}
|