vineri, 2 octombrie 2015

Java: JUnit: Run a unit test inside a inner class -- using @RunWith(Enclosed.class)

package com.test;

//public class in the file
public class GetCountryBasedOnIPDelegate {

//another class in the file (package access)
class CSVGeoCodeNameProvider {
    public static class TestCSVGeoCodeNameProvider extends TestCase {
public void setUp() throws Exception {
//do some setups
                //add some tests
public void testbuildCache() {
long countryIPRangeListSize = countryIPRangeList.size();
GenericUtils.debug(String.format("No. of items in file %s is %d",
GeoIPUtils.ipv4FilePath, countryIPRangeListSize));
assertNotSame(countryIPRangeListSize, 0);
assertNotNull(countryIPRangeList.get(new Long(18153472)).countryCode);
countryIPRangeList.get(new Long(18153472)).countryCode,

Niciun comentariu:

Trimiteți un comentariu