aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/converters/IntegerConverterTest.java
blob: 8691ba00c581b9dac3620a68727a0760cd3f1b31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package org.openecomp.sdc.be.model.tosca.converters;

import java.util.Map;

import org.junit.Assert;
import org.junit.Test;
import org.openecomp.sdc.be.model.DataTypeDefinition;


public class IntegerConverterTest {

	private IntegerConverter createTestSubject() {
		return IntegerConverter.getInstance();
	}

	
	@Test
	public void testGetInstance() throws Exception {
		IntegerConverter result;

		// default test
		result = IntegerConverter.getInstance();
	}

	
	@Test
	public void testConvertToToscaValue() throws Exception {
		IntegerConverter testSubject;
		String value = "";
		String innerType = "";
		Map<String, DataTypeDefinition> dataTypes = null;
		Object result;

		// test 1
		testSubject = createTestSubject();
		value = null;
		result = testSubject.convertToToscaValue(value, innerType, dataTypes);
		Assert.assertEquals(null, result);

		// test 2
		testSubject = createTestSubject();
		value = "";
		result = testSubject.convertToToscaValue(value, innerType, dataTypes);
		Assert.assertEquals(null, result);
	}
}