private void verifyAutocompleteMsg(Message reply, int expectedCursorStart, int expectedCursorEnd) { Map<String, Serializable> content = reply.getContent(); int cursorStart = (int) content.get(CompleteHandler.CURSOR_START); assertThat(cursorStart).isEqualTo(expectedCursorStart); int cursorEnd = (int) content.get(CompleteHandler.CURSOR_END); assertThat(cursorEnd).isEqualTo(expectedCursorEnd); Object[] matches = (Object[]) content.get(CompleteHandler.MATCHES); assertThat(matches).isNotEmpty(); }
@Test public void getControlHandlersWithTargetName_returnNotEmptyHandlersArray() throws Exception { //when Handler<Message>[] handlers = commOpenHandler.getKernelControlChanelHandlers(targetName); //then Assertions.assertThat(handlers).isNotEmpty(); } }
@Test public void getControlHandlersWithTargetName_returnNotEmptyHandlersArray() throws Exception { //when Handler<Message>[] handlers = commOpenHandler.getKernelControlChanelHandlers(targetName); //then Assertions.assertThat(handlers).isNotEmpty(); } }
@Test public void getControlHandlersWithTargetName_returnNotEmptyHandlersArray() throws Exception { //when Handler<Message>[] handlers = commOpenHandler.getKernelControlChanelHandlers(targetName); //then Assertions.assertThat(handlers).isNotEmpty(); } }
@Test public void getControlHandlersWithTargetName_returnNotEmptyHandlersArray() throws Exception { //when Handler<Message>[] handlers = commOpenHandler.getKernelControlChanelHandlers(targetName); //then Assertions.assertThat(handlers).isNotEmpty(); } }
@Test public void getControlHandlersWithTargetName_returnNotEmptyHandlersArray() throws Exception { //when Handler<Message>[] handlers = commOpenHandler.getKernelControlChanelHandlers(targetName); //then Assertions.assertThat(handlers).isNotEmpty(); }
@Test public void setValueWithIntegerArrayParam_hasValueIsNotEmpty() { //when categoryStems.setValue(new Integer[] {new Integer(1), new Integer(2)}); //then Assertions.assertThat(categoryStems.getValue()).isNotEmpty(); } }
@Test public void setValueWithIntegerArrayParam_hasValueIsNotEmpty() { //when categoryLines.setValue(new Integer[] {new Integer(1), new Integer(2)}); //then Assertions.assertThat(categoryLines.getValue()).isNotEmpty(); } }
@Test public void parseHeatmapWithGradientColorScript_returnHeatmapObject() { //when Object result = parseClassFromScript( "data4 = [[1, 2, 3], [3, 2, 1], [2, 2, 1]]\n" + "new HeatMap(data: data4, color: GradientColor.GREEN_YELLOW_WHITE)"); //then Assertions.assertThat(result instanceof HeatMap).isTrue(); HeatMap heatMap = (HeatMap) result; Assertions.assertThat(heatMap.getData()).isNotEmpty(); }
@Test public void setValueWithIntegerArrayOfListsParam_hasValueIsNotEmpty() { //when categoryBars.setValue(new List[] {Arrays.asList(array1), Arrays.asList(array2)}); //then Assertions.assertThat(categoryBars.getValue()).isNotEmpty(); }
@Test public void setValueWithIntegerArrayOfListsParam_hasValueIsNotEmpty() { //when categoryArea.setValue(new List[]{Arrays.asList(array1), Arrays.asList(array2)}); //then Assertions.assertThat(categoryArea.getValue()).isNotEmpty(); }
@Test public void setValueWithIntegerArrayParam_hasValueIsNotEmpty() { //when categoryPoints.setValue(new Integer[] {new Integer(1), new Integer(2)}); //then Assertions.assertThat(categoryPoints.getValue()).isNotEmpty(); }
@Test public void parseHeatmapScript_returnHeatmapObject() { //when Object result = parseClassFromScript( "data4 = [[1, 2, 3], [3, 2, 1], [2, 2, 1]]\n" + "new HeatMap(data: data4)"); //then Assertions.assertThat(result instanceof HeatMap).isTrue(); HeatMap heatMap = (HeatMap) result; Assertions.assertThat(heatMap.getData()).isNotEmpty(); }
@Test public void setValueWithIntegerArrayParam_hasValueIsNotEmpty() { //when categoryBars.setValue(array1); //then Assertions.assertThat(categoryBars.getValue()).isNotEmpty(); }
@Test public void setValueWithIntegerArrayParam_hasValueIsNotEmpty() { //when categoryArea.setValue(array1); //then Assertions.assertThat(categoryArea.getValue()).isNotEmpty(); }
@Test public void shouldSendCommMsgWhenDataChange() { //given Integer[][] data = { new Integer[]{1, 2}, new Integer[]{3, 4} }; HeatMap heatMap = createWidget(); //when heatMap.setData(data); //then assertThat(heatMap.getData()).isNotEmpty(); List valueAsArray = getValueAsArray(GRAPHICS_LIST); assertThat(valueAsArray).isNotEmpty(); }
assertThat(inflated.getLongArray("longArr")).isNotEmpty().containsExactly(4L, 5L, 6L); assertThat(inflated.getDoubleArray("doubleArr")).isNotEmpty().containsExactly(7.0, 8.0, 9.0); assertThat(inflated.getStringArray("stringArr")).isNotEmpty().containsExactly("Hello", "world");
@Test public void createTrustManagers() throws Exception { final TrustManager[] trustManagers = ActiveMQUtil.createTrustManagers(TEST_CERT); assertThat(trustManagers).isNotNull().isNotEmpty(); } }
@Test public void checkDefaultValues() { PermissionConfiguration configuration = new PermissionConfiguration.Builder().build(); assertThat(configuration.permissionProvider()) .isNotNull() .isExactlyInstanceOf(DefaultPermissionProvider.class); assertThat(configuration.permissionProvider().getDialogProvider()).isNull(); assertThat(configuration.permissionProvider().getRequiredPermissions()) .isNotEmpty() .isEqualTo(new String[] { Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION }); }
@Test public void createTempFileInsideDir() { final Path dir = newTempDir(); assertThat(dir.toFile().list()).isEmpty(); final Path tempFile = Files.createTempFile(dir, null, null); assertThat(tempFile).isNotNull(); assertThat(tempFile.getFileName().toString()).endsWith("tmp"); assertThat(tempFile.toFile()).exists(); assertThat(dir.toFile().list()).isNotEmpty(); }