예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testJacksonBug146()
        public virtual void testJacksonBug146()
        {
            Stream resourceAsStream = this.GetType().ClassLoader.getResourceAsStream("org/camunda/bpm/integrationtest/functional/spin/jackson146.json");
            string jackson146       = SpinIoUtil.inputStreamAsString(resourceAsStream);

            // this should not fail
            SpinJsonNode node = JSON(jackson146);

            // file has 4000 characters in length a
            // 20 characters per repeated JSON object
            assertEquals(200, node.prop("abcdef").elements().size());
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testJacksonBug146AsVariable()
        public virtual void testJacksonBug146AsVariable()
        {
            Stream resourceAsStream = this.GetType().ClassLoader.getResourceAsStream("org/camunda/bpm/integrationtest/functional/spin/jackson146.json");
            string jackson146       = SpinIoUtil.inputStreamAsString(resourceAsStream);

//JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method:
            ProcessInstance pi = runtimeService.startProcessInstanceByKey("testProcess", Variables.createVariables().putValue("jackson146", serializedObjectValue(jackson146).serializationDataFormat("application/json").objectTypeName(typeof(Hashtable).FullName)));

            // file has 4000 characters in length a
            // 20 characters per repeated JSON object
            ObjectValue objectValue = runtimeService.getVariableTyped(pi.Id, "jackson146", true);
            Dictionary <string, IList <object> > map = (Dictionary <string, IList <object> >)objectValue.Value;

            assertEquals(200, map["abcdef"].Count);
        }