Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testSetDateVariable() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        public virtual void testSetDateVariable()
        {
            string variableValue = testDateFormat.format(testDate);

            IDictionary <string, object> variableJson = VariablesBuilder.getVariableValueMap(variableValue, "Date");

            given().pathParam("id", EXAMPLE_PROCESS_INSTANCE_ID).pathParam("varId", EXAMPLE_VARIABLE_KEY).contentType(ContentType.JSON).body(variableJson).then().expect().statusCode(Status.NO_CONTENT.StatusCode).when().put(SINGLE_PROCESS_INSTANCE_VARIABLE_URL);

            verify(runtimeServiceMock).setVariable(eq(EXAMPLE_PROCESS_INSTANCE_ID), eq(EXAMPLE_VARIABLE_KEY), argThat(EqualsPrimitiveValue.dateValue(testDate)));
        }