Skip to content

Commit

Permalink
Added Unit tests for StringUtil class
Browse files Browse the repository at this point in the history
I have added unit tests for StringUtil class whichc has not yet been covered with the tests, so the coverage of this file
went from 0% to 85% (line coverage). I still have to add additional tests for "splitValues" method, which has not et been tested
because I do not want to exceed 1k LOC.

Signed-off-by: Leonardo Gaube <leonardo.gaube@comtrade.com>
  • Loading branch information
Leonardo Gaube committed Mar 25, 2020
1 parent 8e4a8a1 commit fccf965
Show file tree
Hide file tree
Showing 2 changed files with 677 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*******************************************************************************
* Copyright (c) 2020 Eurotech and/or its affiliates and others
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Eurotech - initial API and implementation
*******************************************************************************/
package org.eclipse.kapua.commons.util;

import org.eclipse.kapua.qa.markers.junit.JUnitTests;
import org.junit.Assert;
import org.junit.Test;
import org.junit.experimental.categories.Category;

@Category(JUnitTests.class)
public class KapuaErrorCodesTest extends Assert {

@Test
public void testIdGenerationError() {
try {
assertNotNull(KapuaCommonsErrorCodes.valueOf("ID_GENERATION_ERROR"));
} catch (Exception ex) {
fail("ID_GENERATION_ERROR Enum does not exist");
}
}
}
Loading

0 comments on commit fccf965

Please sign in to comment.