public class org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble extends java.lang.Object
{
public org.junit.rules.ExpectedException expectedException;
private org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation;
public void <init>()
{
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble v;
org.junit.rules.ExpectedException v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble;
specialinvoke v.<java.lang.Object: void <init>()>();
v = staticinvoke <org.junit.rules.ExpectedException: org.junit.rules.ExpectedException none()>();
v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble: org.junit.rules.ExpectedException expectedException> = v;
return;
}
public void setUp() throws java.lang.Exception
{
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble v;
com.fasterxml.jackson.databind.JsonNode v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble;
v = new org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
v = staticinvoke <org.apache.isis.viewer.restfulobjects.applib.JsonFixture: com.fasterxml.jackson.databind.JsonNode readJson(java.lang.String)>("map.json");
specialinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: void <init>(com.fasterxml.jackson.databind.JsonNode)>(v);
v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation> = v;
return;
}
public void happyCase() throws java.io.IOException
{
java.lang.Double v, v;
org.hamcrest.Matcher v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
v = virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.lang.Double getDouble(java.lang.String)>("aDouble");
v = staticinvoke <java.lang.Double: java.lang.Double valueOf(double)>(1.2345678901234534E16);
v = staticinvoke <org.hamcrest.CoreMatchers: org.hamcrest.Matcher is(java.lang.Object)>(v);
staticinvoke <org.hamcrest.MatcherAssert: void assertThat(java.lang.Object,org.hamcrest.Matcher)>(v, v);
return;
}
public void forNonExistent() throws java.io.IOException
{
java.lang.Double v;
org.hamcrest.Matcher v, v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
v = virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.lang.Double getDouble(java.lang.String)>("doesNotExist");
v = staticinvoke <org.hamcrest.CoreMatchers: org.hamcrest.Matcher nullValue()>();
v = staticinvoke <org.hamcrest.CoreMatchers: org.hamcrest.Matcher is(org.hamcrest.Matcher)>(v);
staticinvoke <org.hamcrest.MatcherAssert: void assertThat(java.lang.Object,org.hamcrest.Matcher)>(v, v);
return;
}
public void forValueButNotAnLong() throws java.io.IOException
{
org.hamcrest.Matcher v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble v;
java.lang.String v;
java.lang.IllegalArgumentException v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble;
label:
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.lang.Double getDouble(java.lang.String)>("aString");
staticinvoke <org.junit.Assert: void fail()>();
label:
goto label;
label:
v := @caughtexception;
v = virtualinvoke v.<java.lang.IllegalArgumentException: java.lang.String getMessage()>();
v = staticinvoke <org.hamcrest.CoreMatchers: org.hamcrest.Matcher is(java.lang.Object)>("\'aString\' is not a double");
staticinvoke <org.hamcrest.MatcherAssert: void assertThat(java.lang.Object,org.hamcrest.Matcher)>(v, v);
label:
return;
catch java.lang.IllegalArgumentException from label to label with label;
}
public void forMap() throws java.io.IOException
{
org.hamcrest.Matcher v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble v;
java.lang.String v;
java.lang.IllegalArgumentException v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble;
label:
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.lang.Double getDouble(java.lang.String)>("aSubMap");
staticinvoke <org.junit.Assert: void fail()>();
label:
goto label;
label:
v := @caughtexception;
v = virtualinvoke v.<java.lang.IllegalArgumentException: java.lang.String getMessage()>();
v = staticinvoke <org.hamcrest.CoreMatchers: org.hamcrest.Matcher is(java.lang.Object)>("\'aSubMap\' is not a double");
staticinvoke <org.hamcrest.MatcherAssert: void assertThat(java.lang.Object,org.hamcrest.Matcher)>(v, v);
label:
return;
catch java.lang.IllegalArgumentException from label to label with label;
}
public void forList() throws java.io.IOException
{
org.hamcrest.Matcher v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble v;
java.lang.String v;
java.lang.IllegalArgumentException v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble;
label:
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.lang.Double getDouble(java.lang.String)>("aSubList");
staticinvoke <org.junit.Assert: void fail()>();
label:
goto label;
label:
v := @caughtexception;
v = virtualinvoke v.<java.lang.IllegalArgumentException: java.lang.String getMessage()>();
v = staticinvoke <org.hamcrest.CoreMatchers: org.hamcrest.Matcher is(java.lang.Object)>("\'aSubList\' is not a double");
staticinvoke <org.hamcrest.MatcherAssert: void assertThat(java.lang.Object,org.hamcrest.Matcher)>(v, v);
label:
return;
catch java.lang.IllegalArgumentException from label to label with label;
}
public void forMultipartKey() throws java.io.IOException
{
java.lang.Double v, v;
org.hamcrest.Matcher v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getDouble: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
v = virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.lang.Double getDouble(java.lang.String)>("aSubMap.aDouble");
v = staticinvoke <java.lang.Double: java.lang.Double valueOf(double)>(1.2345678901234534E16);
v = staticinvoke <org.hamcrest.CoreMatchers: org.hamcrest.Matcher is(java.lang.Object)>(v);
staticinvoke <org.hamcrest.MatcherAssert: void assertThat(java.lang.Object,org.hamcrest.Matcher)>(v, v);
return;
}
}