示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testBinaryDataForNonBinaryVariable()
        public virtual void testBinaryDataForNonBinaryVariable()
        {
            HistoricVariableUpdate detailMock = MockProvider.createMockHistoricVariableUpdate();

            when(historicDetailQueryMock.detailId(detailMock.Id)).thenReturn(historicDetailQueryMock);
            when(historicDetailQueryMock.disableCustomObjectDeserialization()).thenReturn(historicDetailQueryMock);
            when(historicDetailQueryMock.singleResult()).thenReturn(detailMock);

            given().pathParam("id", MockProvider.EXAMPLE_HISTORIC_VAR_UPDATE_ID).then().expect().statusCode(Status.BAD_REQUEST.StatusCode).body(containsString("Value of variable with id aHistoricVariableUpdateId is not a binary value")).when().get(VARIABLE_INSTANCE_BINARY_DATA_URL);

            verify(historicDetailQueryMock, never()).disableBinaryFetching();
        }