01: /*
02: * ColumnValueSubstringTest.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.db.importer.modifier;
13:
14: import junit.framework.TestCase;
15:
16: /**
17: *
18: * @author support@sql-workbench.net
19: */
20: public class ColumnValueSubstringTest extends TestCase {
21: public ColumnValueSubstringTest(String testName) {
22: super (testName);
23: }
24:
25: public void testGetSubstring() {
26: ColumnValueSubstring sub = new ColumnValueSubstring(5, 20);
27: String s = sub.getSubstring("1");
28: assertEquals("1", s);
29:
30: s = sub.getSubstring("1234567890");
31: assertEquals("67890", s);
32:
33: s = sub.getSubstring("123456789012345678901234567890");
34: assertEquals("678901234567890", s);
35:
36: }
37: }
|