List of usage examples for org.apache.commons.lang3 StringUtils EMPTY
String EMPTY
To view the source code for org.apache.commons.lang3 StringUtils EMPTY.
Click Source Link
From source file:com.aqnote.app.wifianalyzer.wifi.model.WiFiAdditionalTest.java
@Test public void testWiFiAdditionalEmpty() throws Exception { assertEquals(StringUtils.EMPTY, WiFiAdditional.EMPTY.getVendorName()); assertEquals(StringUtils.EMPTY, WiFiAdditional.EMPTY.getIPAddress()); assertEquals(WiFiConnection.LINK_SPEED_INVALID, WiFiAdditional.EMPTY.getLinkSpeed()); assertFalse(WiFiAdditional.EMPTY.isConnected()); assertFalse(WiFiAdditional.EMPTY.isConfiguredNetwork()); }
From source file:com.tojc.ormlite.android.annotation.info.ContentUriInfoTest.java
public void testIsValidValue_returns_false_for_null_or_empty_package_or_class() { // given//from w ww .j a va 2s . c o m contentUriInfo = new ContentUriInfo(null, null); // when // then assertFalse(contentUriInfo.isValidValue()); // -- // given contentUriInfo = new ContentUriInfo(null, TEST_PATH); // when // then assertFalse(contentUriInfo.isValidValue()); // -- // given contentUriInfo = new ContentUriInfo(TEST_AUTHORITY, null); // when // then assertFalse(contentUriInfo.isValidValue()); // -- // given contentUriInfo = new ContentUriInfo(TEST_AUTHORITY, StringUtils.EMPTY); // when // then assertFalse(contentUriInfo.isValidValue()); // -- // given contentUriInfo = new ContentUriInfo(StringUtils.EMPTY, TEST_PATH); // when // then assertFalse(contentUriInfo.isValidValue()); }
From source file:kr.co.generic.wifianalyzer.wifi.graph.channel.ChannelAxisLabelTest.java
@Test public void testYAxis() throws Exception { assertEquals(StringUtils.EMPTY, fixture.formatLabel(GraphViewBuilder.MIN_Y, false)); assertEquals("-99", fixture.formatLabel(GraphViewBuilder.MIN_Y + 1, false)); assertEquals("-20", fixture.formatLabel(GraphViewBuilder.MAX_Y, false)); assertEquals(StringUtils.EMPTY, fixture.formatLabel(GraphViewBuilder.MAX_Y + 1, false)); }
From source file:com.tojc.ormlite.android.framework.MimeTypeVndTest.java
public void testIsValid_returns_false_if_mime_type_has_null_or_empty_path() { // given/* w w w. ja v a2 s . c o m*/ mimeTypeVnd = new MimeTypeVnd(SubType.ITEM, new ContentMimeTypeVndInfo(null, CONTENT_MIME_TYPE_VND_TYPE)); // when // then assertFalse(mimeTypeVnd.isValid()); // -- // given mimeTypeVnd = new MimeTypeVnd(SubType.ITEM, new ContentMimeTypeVndInfo(StringUtils.EMPTY, CONTENT_MIME_TYPE_VND_TYPE)); // when // then assertFalse(mimeTypeVnd.isValid()); }
From source file:de.lebenshilfe_muenster.uk_gebaerden_muensterland.SignTest.java
@Test(expected = IllegalArgumentException.class) public void testNameCannotBeEmpty() { new Sign.Builder().setId(0).setName(StringUtils.EMPTY).setNameLocaleDe(FUSSBALL).setMnemonic(KICK_A_BALL) .setStarred(false).setLearningProgress(0).create(); }
From source file:com.aqnote.app.wifianalyzer.wifi.graph.channel.ChannelAxisLabelTest.java
@Test public void testYAxis() throws Exception { assertEquals(StringUtils.EMPTY, fixture.formatLabel(GraphViewBuilder.MIN_Y, false)); assertEquals("-99", fixture.formatLabel(GraphViewBuilder.MIN_Y + 1, false)); assertEquals("-10", fixture.formatLabel(GraphViewBuilder.MAX_Y, false)); assertEquals(StringUtils.EMPTY, fixture.formatLabel(GraphViewBuilder.MAX_Y + 1, false)); }
From source file:lineage2.gameserver.network.serverpackets.ExShowDominionRegistry.java
public ExShowDominionRegistry(Player activeChar, Dominion dominion) { _dominionId = dominion.getId();//from w w w. ja va 2 s. co m Clan owner = dominion.getOwner(); Alliance alliance = owner.getAlliance(); DominionSiegeEvent siegeEvent = dominion.getSiegeEvent(); _ownerClanName = owner.getName(); _ownerLeaderName = owner.getLeaderName(); _ownerAllyName = alliance == null ? StringUtils.EMPTY : alliance.getAllyName(); _warTime = (int) (dominion.getSiegeDate().getTimeInMillis() / 1000L); _currentTime = (int) (System.currentTimeMillis() / 1000L); _mercReq = siegeEvent.getObjects(DominionSiegeEvent.DEFENDER_PLAYERS).size(); _clanReq = siegeEvent.getObjects(SiegeEvent.DEFENDERS).size() + 1; _registeredAsPlayer = siegeEvent.getObjects(DominionSiegeEvent.DEFENDER_PLAYERS) .contains(activeChar.getObjectId()); _registeredAsClan = siegeEvent.getSiegeClan(SiegeEvent.DEFENDERS, activeChar.getClan()) != null; List<Dominion> dominions = ResidenceHolder.getInstance().getResidenceList(Dominion.class); _flags = new ArrayList<>(dominions.size()); for (Dominion d : dominions) { _flags.add(new TerritoryFlagsInfo(d.getId(), d.getFlags())); } }
From source file:models.PullRequestMergeResult.java
public String getConflictFilesToString() { if (gitConflicts == null) { return StringUtils.EMPTY; }/* w ww . jav a2 s . co m*/ return StringUtils.join(gitConflicts.conflictFiles, PullRequest.DELIMETER); }
From source file:de.blizzy.documentr.web.macro.MacroController.java
@RequestMapping(value = "/create", method = RequestMethod.GET) @PreAuthorize("hasApplicationPermission(ADMIN)") public String createMacro(Model model) { MacroForm form = new MacroForm(StringUtils.EMPTY, StringUtils.EMPTY); model.addAttribute("macroForm", form); //$NON-NLS-1$ return "/macro/edit"; //$NON-NLS-1$ }
From source file:com.sirius.hadoop.job.onlinetime.StatusMapper.java
@Override protected void map(Object key, Text value, Context context) throws IOException, InterruptedException { log.info(value.toString());/*from w w w. ja v a 2s. co m*/ Map<String, Object> m; try { m = mapper.readValue(value.toString(), Map.class); } catch (IOException e) { throw new RuntimeException(value.toString(), e); } statusKey.userId = (String) ObjectUtils.defaultIfNull(m.get("u"), StringUtils.EMPTY); statusKey.time = (Long) ObjectUtils.defaultIfNull(m.get("ct"), -1L); if ("online".equals(m.get("t"))) { record.onlineTime = statusKey.time; record.offlineTime = -1; } else { record.onlineTime = -1; record.offlineTime = statusKey.time; } context.write(statusKey, record); }