public class org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger extends java.lang.Object
{
public org.junit.rules.ExpectedException expectedException;
private org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation;
public void <init>()
{
org.junit.rules.ExpectedException v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger;
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_getBigInteger: org.junit.rules.ExpectedException expectedException> = v;
return;
}
public void setUp() throws java.lang.Exception
{
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
com.fasterxml.jackson.databind.JsonNode v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger;
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_getBigInteger: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation> = v;
return;
}
public void happyCase() throws java.io.IOException
{
org.hamcrest.Matcher v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
java.math.BigInteger v, v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
v = virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.math.BigInteger getBigInteger(java.lang.String)>("aBigInteger");
v = new java.math.BigInteger;
specialinvoke v.<java.math.BigInteger: void <init>(java.lang.String)>("12345678901234567890");
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 happyCaseForFormatJustFits() throws java.io.IOException
{
org.hamcrest.Matcher v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
java.math.BigInteger v, v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
v = virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.math.BigInteger getBigInteger(java.lang.String,java.lang.String)>("aBigInteger", "big-integer(20)");
v = new java.math.BigInteger;
specialinvoke v.<java.math.BigInteger: void <init>(java.lang.String)>("12345678901234567890");
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 invalidFormat() throws java.io.IOException
{
org.hamcrest.Matcher v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
java.math.BigInteger v, v;
org.junit.rules.ExpectedException v, v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.junit.rules.ExpectedException expectedException>;
virtualinvoke v.<org.junit.rules.ExpectedException: void expect(java.lang.Class)>(class "Ljava/lang/IllegalArgumentException;");
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.junit.rules.ExpectedException expectedException>;
virtualinvoke v.<org.junit.rules.ExpectedException: void expectMessage(java.lang.String)>("Value \'12345678901234567890\' larger than that allowed by format \'big-integer(19)\'");
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
v = virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.math.BigInteger getBigInteger(java.lang.String,java.lang.String)>("aBigInteger", "big-integer(19)");
v = new java.math.BigInteger;
specialinvoke v.<java.math.BigInteger: void <init>(java.lang.String)>("12345678901234567890");
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 validFormattedFromPath() throws java.io.IOException
{
org.hamcrest.Matcher v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
java.math.BigInteger v, v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
v = virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.math.BigInteger getBigInteger(java.lang.String)>("yetAnotherSubMap.aFormattedBigInteger.value");
v = new java.math.BigInteger;
specialinvoke v.<java.math.BigInteger: void <init>(java.lang.String)>("123");
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 invalidFormattedFromPath() throws java.io.IOException
{
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
org.junit.rules.ExpectedException v, v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.junit.rules.ExpectedException expectedException>;
virtualinvoke v.<org.junit.rules.ExpectedException: void expect(java.lang.Class)>(class "Ljava/lang/IllegalArgumentException;");
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.junit.rules.ExpectedException expectedException>;
virtualinvoke v.<org.junit.rules.ExpectedException: void expectMessage(java.lang.String)>("Value \'123\' larger than that allowed by format \'big-integer(2)\'");
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.math.BigInteger getBigInteger(java.lang.String)>("yetAnotherSubMap.anInvalidFormattedBigInteger.value");
return;
}
public void invalidFormattedFromPathButOverridden() throws java.io.IOException
{
org.hamcrest.Matcher v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
java.math.BigInteger v, v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
v = virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.math.BigInteger getBigInteger(java.lang.String,java.lang.String)>("yetAnotherSubMap.anInvalidFormattedBigInteger.value", "big-integer(3)");
v = new java.math.BigInteger;
specialinvoke v.<java.math.BigInteger: void <init>(java.lang.String)>("123");
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
{
org.hamcrest.Matcher v, v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
java.math.BigInteger v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
v = virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.math.BigInteger getBigInteger(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 forNonParseableString() throws java.io.IOException
{
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
org.junit.rules.ExpectedException v, v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.junit.rules.ExpectedException expectedException>;
virtualinvoke v.<org.junit.rules.ExpectedException: void expect(java.lang.Class)>(class "Ljava/lang/IllegalArgumentException;");
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.junit.rules.ExpectedException expectedException>;
virtualinvoke v.<org.junit.rules.ExpectedException: void expectMessage(java.lang.String)>("\'aString\' is not a biginteger");
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.math.BigInteger getBigInteger(java.lang.String)>("aString");
return;
}
public void forMap() throws java.io.IOException
{
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
org.junit.rules.ExpectedException v, v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.junit.rules.ExpectedException expectedException>;
virtualinvoke v.<org.junit.rules.ExpectedException: void expect(java.lang.Class)>(class "Ljava/lang/IllegalArgumentException;");
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.junit.rules.ExpectedException expectedException>;
virtualinvoke v.<org.junit.rules.ExpectedException: void expectMessage(java.lang.String)>("\'aSubMap\' is not a biginteger");
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.math.BigInteger getBigInteger(java.lang.String)>("aSubMap");
return;
}
public void forList() throws java.io.IOException
{
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
org.junit.rules.ExpectedException v, v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.junit.rules.ExpectedException expectedException>;
virtualinvoke v.<org.junit.rules.ExpectedException: void expect(java.lang.Class)>(class "Ljava/lang/IllegalArgumentException;");
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.junit.rules.ExpectedException expectedException>;
virtualinvoke v.<org.junit.rules.ExpectedException: void expectMessage(java.lang.String)>("\'aSubList\' is not a biginteger");
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.math.BigInteger getBigInteger(java.lang.String)>("aSubList");
return;
}
public void forMultipartKey() throws java.io.IOException
{
org.hamcrest.Matcher v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation v;
java.math.BigInteger v, v;
org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger v;
v := @this: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger;
v = v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentationTest_getBigInteger: org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation jsonRepresentation>;
v = virtualinvoke v.<org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation: java.math.BigInteger getBigInteger(java.lang.String)>("aSubMap.aBigInteger");
v = new java.math.BigInteger;
specialinvoke v.<java.math.BigInteger: void <init>(java.lang.String)>("12345678901234567890");
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;
}
}