01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: ******************************************************************************/package org.eclipse.core.tests.internal.databinding.conversion;
11:
12: import org.eclipse.core.internal.databinding.conversion.StringToNumberParser;
13:
14: /**
15: * @since 1.1
16: */
17: public class StringToNumberParserIntegerTest extends
18: StringToNumberParserTestHarness {
19:
20: /* (non-Javadoc)
21: * @see org.eclipse.core.tests.internal.databinding.conversion.StringToNumberParserTestHarness#assertValid(java.lang.Number)
22: */
23: protected boolean assertValid(Number number) {
24: return StringToNumberParser.inIntegerRange(number);
25: }
26:
27: /* (non-Javadoc)
28: * @see org.eclipse.core.tests.internal.databinding.conversion.StringToNumberParserTestHarness#getValidMax()
29: */
30: protected Number getValidMax() {
31: return new Integer(Integer.MAX_VALUE);
32: }
33:
34: /* (non-Javadoc)
35: * @see org.eclipse.core.tests.internal.databinding.conversion.StringToNumberParserTestHarness#getValidMin()
36: */
37: protected Number getValidMin() {
38: return new Integer(Integer.MIN_VALUE);
39: }
40: }
|