StringBuffer buffer = new StringBuffer();
buffer.append("[WRITEACCESS]\n");
- buffer.append(" .name = ").append(field_1_username.toString()).append("\n");
+ buffer.append(" .name = ").append(field_1_username).append("\n");
buffer.append("[/WRITEACCESS]\n");
return buffer.toString();
}
HSSFSheet s = wb.getSheetAt(0);
HSSFCell cell1 = s.getRow(0).getCell(0);
- assertEquals("test ", cell1.getStringCellValue().toString());
+ assertEquals("test ", cell1.getStringCellValue());
HSSFCell cell2 = s.getRow(0).getCell(1);
assertEquals(1.0, cell2.getNumericCellValue(), 0.0);
public void testDrawString() {
graphics.drawString("This is a test", 10, 10);
HSSFTextbox t = (HSSFTextbox) escherGroupA.getChildren().get(0);
- assertEquals("This is a test", t.getString().getString().toString());
+ assertEquals("This is a test", t.getString().getString());
}
public void testGetDataBackAgain() throws Exception {
public void testDrawString() {
graphics.drawString("This is a test", 10, 10);
HSSFTextbox t = (HSSFTextbox) escherGroup.getChildren().get(0);
- assertEquals("This is a test", t.getString().getString().toString());
+ assertEquals("This is a test", t.getString());
// Check that with a valid font, it's still ok
Font font = new Font("Forte", Font.PLAIN, 12);
}
public void testFailWhenStartDateAfterEndDate() {
- assertEquals(NAME_INVALID, NetworkdaysFunction.instance.evaluate(new ValueEval[]{ new StringEval(END_DATE.toString()),
- new StringEval(STARTING_DATE.toString()) }, EC));
+ assertEquals(NAME_INVALID, NetworkdaysFunction.instance.evaluate(new ValueEval[]{ new StringEval(END_DATE),
+ new StringEval(STARTING_DATE) }, EC));
}
public void testReturnNetworkdays() {
assertEquals(108, (int) ((NumericValueEval) NetworkdaysFunction.instance.evaluate(new ValueEval[]{
- new StringEval(STARTING_DATE.toString()), new StringEval(END_DATE.toString()) }, EC)).getNumberValue());
+ new StringEval(STARTING_DATE), new StringEval(END_DATE) }, EC)).getNumberValue());
}
public void testReturnNetworkdaysWithAHoliday() {
assertEquals(107, (int) ((NumericValueEval) NetworkdaysFunction.instance.evaluate(new ValueEval[]{
- new StringEval(STARTING_DATE.toString()), new StringEval(END_DATE.toString()), new StringEval(FIRST_HOLIDAY.toString()) },
+ new StringEval(STARTING_DATE), new StringEval(END_DATE), new StringEval(FIRST_HOLIDAY) },
EC)).getNumberValue());
}
public void testReturnNetworkdaysWithManyHolidays() {
assertEquals(105, (int) ((NumericValueEval) NetworkdaysFunction.instance.evaluate(new ValueEval[]{
- new StringEval(STARTING_DATE.toString()), new StringEval(END_DATE.toString()),
+ new StringEval(STARTING_DATE), new StringEval(END_DATE),
new MockAreaEval(FIRST_HOLIDAY, SECOND_HOLIDAY, THIRD_HOLIDAY) }, EC)).getNumberValue());
}
public void testReturnWorkdays() {
assertEquals(new Date(109, APRIL, 30), DateUtil.getJavaDate(((NumberEval) WorkdayFunction.instance.evaluate(new ValueEval[]{
- new StringEval(STARTING_DATE.toString()), new NumberEval(151) }, EC)).getNumberValue()));
+ new StringEval(STARTING_DATE), new NumberEval(151) }, EC)).getNumberValue()));
}
public void testReturnWorkdaysSpanningAWeekendSubtractingDays() {
public void testReturnWorkdaysWithDaysTruncated() {
assertEquals(new Date(109, APRIL, 30), DateUtil.getJavaDate(((NumberEval) WorkdayFunction.instance.evaluate(new ValueEval[]{
- new StringEval(STARTING_DATE.toString()), new NumberEval(151.99999) }, EC)).getNumberValue()));
+ new StringEval(STARTING_DATE), new NumberEval(151.99999) }, EC)).getNumberValue()));
}
public void testReturnRetroativeWorkday() {
assertEquals(new Date(108, SEPTEMBER, 23), DateUtil.getJavaDate(((NumberEval) WorkdayFunction.instance.evaluate(new ValueEval[]{
- new StringEval(STARTING_DATE.toString()), new NumberEval(-5), new StringEval(RETROATIVE_HOLIDAY.toString()) }, EC))
+ new StringEval(STARTING_DATE), new NumberEval(-5), new StringEval(RETROATIVE_HOLIDAY) }, EC))
.getNumberValue()));
}
public void testReturnNetworkdaysWithManyHolidays() {
assertEquals(new Date(109, MAY, 5), DateUtil.getJavaDate(((NumberEval) WorkdayFunction.instance.evaluate(new ValueEval[]{
- new StringEval(STARTING_DATE.toString()), new NumberEval(151),
+ new StringEval(STARTING_DATE), new NumberEval(151),
new MockAreaEval(FIRST_HOLIDAY, SECOND_HOLIDAY, THIRD_HOLIDAY) }, EC)).getNumberValue()));
}