words/src/test/java/org/apidesign/demo/words/DataModelTest.java
author Jaroslav Tulach <jtulach@netbeans.org>
Thu, 15 Aug 2013 13:17:54 +0200
changeset 46 009537e6ce80
parent 43 spinningcube/src/test/java/org/apidesign/demo/spinningcube/DataModelTest.java@2eb4783aff45
child 56 68cecf6c3113
permissions -rw-r--r--
Simpler animation demo that works on JDK7
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@46
    24
package org.apidesign.demo.words;
jtulach@43
    25
jtulach@43
    26
import static org.testng.Assert.*;
jtulach@43
    27
import org.testng.annotations.Test;
jtulach@43
    28
jtulach@43
    29
public class DataModelTest {
jtulach@43
    30
    @Test public void areHelloWorldTwoWords() {
jtulach@43
    31
        Data model = new Data();
jtulach@43
    32
        model.setMessage("Hello World!");
jtulach@43
    33
        
jtulach@43
    34
        String[] arr = model.getSides();
jtulach@43
    35
        assertEquals(arr.length, 6, "Cube has six sides");
jtulach@43
    36
        assertEquals("Hello", arr[0], "Hello is the first word");
jtulach@43
    37
        assertEquals("World!", arr[1], "World is the second word");
jtulach@43
    38
    }
jtulach@43
    39
}