package jp.sfjp.jindolf.config;
-import java.util.List;
import java.util.Arrays;
import java.util.LinkedList;
+import java.util.List;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+
import static org.junit.Assert.*;
/**
List<CmdOption> list = Arrays.asList(values);
- List<CmdOption> testList = new LinkedList<CmdOption>();
+ List<CmdOption> testList = new LinkedList<>();
testList.add(CmdOption.OPT_HELP);
testList.add(CmdOption.OPT_VERSION);
testList.add(CmdOption.OPT_BOLDMETAL);
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+
import static org.junit.Assert.*;
/**
assertNotNull(result);
try{
- result = OptionInfo.parseOptions("X");
+ OptionInfo.parseOptions("X");
fail();
}catch(IllegalArgumentException e){
assertEquals("未定義の起動オプション[X]が指定されました。",
}
try{
- result = OptionInfo.parseOptions("");
+ OptionInfo.parseOptions("");
fail();
}catch(IllegalArgumentException e){
assertEquals("未定義の起動オプション[]が指定されました。",
OptionInfo result;
try{
- result = OptionInfo.parseOptions("-antialias");
+ OptionInfo.parseOptions("-antialias");
fail();
}catch(IllegalArgumentException e){
String expMsg =
}
try{
- result = OptionInfo.parseOptions("-fractional");
+ OptionInfo.parseOptions("-fractional");
fail();
}catch(IllegalArgumentException e){
String expMsg =
}
try{
- result = OptionInfo.parseOptions("-antialias", "X");
+ OptionInfo.parseOptions("-antialias", "X");
fail();
}catch(IllegalArgumentException e){
String expMsg =
}
try{
- result = OptionInfo.parseOptions("-fractional", "X");
+ OptionInfo.parseOptions("-fractional", "X");
fail();
}catch(IllegalArgumentException e){
String expMsg =
OptionInfo result;
try{
- result = OptionInfo.parseOptions("-initfont");
+ OptionInfo.parseOptions("-initfont");
fail();
}catch(IllegalArgumentException e){
String expMsg =
}
try{
- result = OptionInfo.parseOptions("-confdir");
+ OptionInfo.parseOptions("-confdir");
fail();
}catch(IllegalArgumentException e){
String expMsg =
assertNull(result.initialFrameYpos());
try{
- result = OptionInfo.parseOptions("-geometry");
+ OptionInfo.parseOptions("-geometry");
fail();
}catch(IllegalArgumentException e){
String expMsg =
}
try{
- result = OptionInfo.parseOptions("-geometry", "Q");
+ OptionInfo.parseOptions("-geometry", "Q");
fail();
}catch(IllegalArgumentException e){
String expMsg =
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+
import static org.junit.Assert.*;
/**
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+
import static org.junit.Assert.*;
/**
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+
import static org.junit.Assert.*;
/**
assertEquals(456, result);
try{
- result = StringUtils.parseInt(null, matcher, 1);
+ StringUtils.parseInt(null, matcher, 1);
fail();
}catch(NullPointerException e){
}
try{
- result = StringUtils.parseInt(input, null, 1);
+ StringUtils.parseInt(input, null, 1);
fail();
}catch(NullPointerException e){
}
int result;
try{
- result = StringUtils.parseInt(null);
+ StringUtils.parseInt(null);
fail();
}catch(NullPointerException e){
}
int result;
try{
- result = StringUtils.parseInt(null, 1, 3);
+ StringUtils.parseInt(null, 1, 3);
fail();
}catch(NullPointerException e){
}
assertEquals(0, result);
try{
- result = StringUtils.parseInt("1234567", 2, 999);
+ StringUtils.parseInt("1234567", 2, 999);
fail();
}catch(StringIndexOutOfBoundsException e){
}
try{
- result = StringUtils.parseInt("1234567", -1, 5);
+ StringUtils.parseInt("1234567", -1, 5);
fail();
}catch(StringIndexOutOfBoundsException e){
}
CharSequence result;
try{
- result = StringUtils.suppressString(null);
+ StringUtils.suppressString(null);
fail();
}catch(NullPointerException e){
}