jaroslav@1941: /** jaroslav@1941: * Back 2 Browser Bytecode Translator jaroslav@1941: * Copyright (C) 2012-2015 Jaroslav Tulach jaroslav@1941: * jaroslav@1941: * This program is free software: you can redistribute it and/or modify jaroslav@1941: * it under the terms of the GNU General Public License as published by jaroslav@1941: * the Free Software Foundation, version 2 of the License. jaroslav@1941: * jaroslav@1941: * This program is distributed in the hope that it will be useful, jaroslav@1941: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@1941: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@1941: * GNU General Public License for more details. jaroslav@1941: * jaroslav@1941: * You should have received a copy of the GNU General Public License jaroslav@1941: * along with this program. Look for COPYING file in the top folder. jaroslav@1941: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@1941: */ jaroslav@1941: package org.apidesign.bck2brwsr.kosample; jaroslav@1941: jaroslav@1941: import static org.testng.Assert.*; jaroslav@1941: import org.testng.annotations.Test; jaroslav@1941: jaroslav@1941: public class DataModelTest { jaroslav@1941: @Test public void testUIModelWithoutUI() { jaroslav@1941: Data model = new Data(); jaroslav@1941: model.setMessage("Hello World!"); jaroslav@1941: jaroslav@1941: java.util.List arr = model.getWords(); jaroslav@1941: assertEquals(arr.size(), 6, "Six words always"); jaroslav@1941: assertEquals("Hello", arr.get(0), "Hello is the first word"); jaroslav@1941: assertEquals("World!", arr.get(1), "World is the second word"); jaroslav@1941: } jaroslav@1941: }