//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Before public void setUpRuntimeData() public virtual void setUpRuntimeData() { mockInstanceBuilder = MockProvider.mockHistoricVariableInstance(); mockInstance = mockInstanceBuilder.build(); IList <HistoricVariableInstance> mocks = new List <HistoricVariableInstance>(); mocks.Add(mockInstance); mockedQuery = setUpMockHistoricVariableInstanceQuery(mocks); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testSpinVariableInstanceRetrieval() public virtual void testSpinVariableInstanceRetrieval() { MockHistoricVariableInstanceBuilder builder = MockProvider.mockHistoricVariableInstance().typedValue(Variables.serializedObjectValue("aSpinSerializedValue").serializationDataFormat("aDataFormat").objectTypeName("aRootType").create()); IList <HistoricVariableInstance> mockInstances = new List <HistoricVariableInstance>(); mockInstances.Add(builder.build()); mockedQuery = setUpMockHistoricVariableInstanceQuery(mockInstances); given().then().expect().statusCode(Status.OK.StatusCode).and().body("size()", @is(1)).body("[0].type", equalTo(VariableTypeHelper.toExpectedValueTypeName(ValueType.OBJECT))).body("[0].value", equalTo("aSpinSerializedValue")).body("[0].valueInfo." + SerializableValueType.VALUE_INFO_OBJECT_TYPE_NAME, equalTo("aRootType")).body("[0].valueInfo." + SerializableValueType.VALUE_INFO_SERIALIZATION_DATA_FORMAT, equalTo("aDataFormat")).when().get(HISTORIC_VARIABLE_INSTANCE_RESOURCE_URL); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testSerializableVariableInstanceRetrieval() public virtual void testSerializableVariableInstanceRetrieval() { //JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method: MockHistoricVariableInstanceBuilder builder = MockProvider.mockHistoricVariableInstance().typedValue(MockObjectValue.fromObjectValue(Variables.objectValue("a serialized value").serializationDataFormat(Variables.SerializationDataFormats.JAVA).create()).objectTypeName(typeof(string).FullName)); IList <HistoricVariableInstance> mockInstances = new List <HistoricVariableInstance>(); mockInstances.Add(builder.build()); mockedQuery = setUpMockHistoricVariableInstanceQuery(mockInstances); //JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method: given().then().expect().statusCode(Status.OK.StatusCode).and().body("[0].type", equalTo(VariableTypeHelper.toExpectedValueTypeName(ValueType.OBJECT))).body("[0].value", equalTo("a serialized value")).body("[0].valueInfo." + SerializableValueType.VALUE_INFO_OBJECT_TYPE_NAME, equalTo(typeof(string).FullName)).body("[0].valueInfo." + SerializableValueType.VALUE_INFO_SERIALIZATION_DATA_FORMAT, equalTo(Variables.SerializationDataFormats.JAVA.Name)).when().get(HISTORIC_VARIABLE_INSTANCE_RESOURCE_URL); // should not resolve custom objects but existing API requires it // verify(mockedQuery).disableCustomObjectDeserialization(); verify(mockedQuery, never()).disableCustomObjectDeserialization(); }