use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class NetNullableVariableUtils_Test method createNullableVariable_Primitive_Test.
@Test
public void createNullableVariable_Primitive_Test() {
final NetNullableVariable var = createNullableVariable("Name", "java.lang.Integer", false, null);
assertThat(var.getNetType(), is("int"));
}
use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class NetNullableVariableUtils_Test method createNullableVariable_Array_Test.
@Test
public void createNullableVariable_Array_Test() {
final NetNullableVariable var = createNullableVariable("Name", "array", "java.lang.Integer", true, null);
assertThat(var.getNetType(), is("IEnumerable<int>"));
}
use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class NetNullableVariableUtils_Test method createNullableVariable_Enum_Test.
@Test
public void createNullableVariable_Enum_Test() {
final NetNullableVariable var = createNullableVariable("Name", "TestEnumType", false, getTestTypeMap());
assertThat(var.getNetType(), is("TestEnumType"));
}
use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class NetNullableVariableUtils_Test method createNullableVariable_Void_Test.
@Test
public void createNullableVariable_Void_Test() {
final NetNullableVariable var = createNullableVariable("Name", "void", true, null);
assertThat(var.getNetType(), is("bool?"));
}
use of com.spectralogic.ds3autogen.net.model.common.NetNullableVariable in project ds3_autogen by SpectraLogic.
the class BaseRequestGenerator_Test method toWithConstructor_Test.
@Test
public void toWithConstructor_Test() {
final String expectedDoc = "/// <summary>\n" + " /// This is how you use Test Request\n" + " /// </summary>\n" + " /// <param name=\"TestParam\">This is how you use Test Param</param>\n";
final String requestName = "TestRequest";
final String paramName = "TestParam";
final Ds3DocSpec docSpec = new Ds3DocSpecImpl(ImmutableMap.of(requestName, "This is how you use Test Request"), ImmutableMap.of(paramName, "This is how you use Test Param"));
final NetNullableVariable netVar = new NetNullableVariable(paramName, "int", true, true);
final WithConstructorVariable result = toWithConstructor(netVar, requestName, docSpec);
assertThat(result.getName(), is(netVar.getName()));
assertThat(result.getType(), is(netVar.getType()));
assertThat(result.getNetType(), is(netVar.getNetType()));
assertThat(result.getDocumentation(), is(expectedDoc));
}
Aggregations