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 3.2
16: *
17: */
18: public class StringToNumberParserByteTest extends
19: StringToNumberParserTestHarness {
20:
21: /* (non-Javadoc)
22: * @see org.eclipse.core.tests.internal.databinding.conversion.StringToNumberParserTestHarness#assertValid(java.lang.Number)
23: */
24: protected boolean assertValid(Number number) {
25: return StringToNumberParser.inByteRange(number);
26: }
27:
28: /* (non-Javadoc)
29: * @see org.eclipse.core.tests.internal.databinding.conversion.StringToNumberParserTestHarness#getValidMax()
30: */
31: protected Number getValidMax() {
32: return new Byte(Byte.MAX_VALUE);
33: }
34:
35: /* (non-Javadoc)
36: * @see org.eclipse.core.tests.internal.databinding.conversion.StringToNumberParserTestHarness#getValidMin()
37: */
38: protected Number getValidMin() {
39: return new Byte(Byte.MIN_VALUE);
40: }
41: }
|