response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int value = 0;
_sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &value, NULL);
assert_int_equal(value, 24);
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
char value[50] = {0};
assert_int_equal(option_num, 24);
assert_string_equal(value, "DocumentFeeder");
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
char value[50] = {0};
assert_int_equal(option_num, 24);
assert_string_equal(value, "Color");
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
int value = 0;
assert_int_equal(option_num, 24);
assert_int_equal(value, 200);
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
char value[50] = {0};
assert_int_equal(option_num, 24);
assert_string_equal(value, "Duplex");
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
int value = 0;
assert_int_equal(option_num, 24);
assert_int_equal(value, 8);
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
int value = -1;
assert_int_equal(option_num, 24);
assert_int_equal(value, 0);
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
char value[50] = {0};
assert_int_equal(option_num, 24);
assert_string_equal(value, "None");
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
int value = -1;
assert_int_equal(option_num, 24);
assert_int_equal(value, 0);
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
char value[50] = {0};
assert_int_equal(option_num, 24);
assert_string_equal(value, "Automatic");
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
char value[50] = {0};
assert_int_equal(option_num, 24);
assert_string_equal(value, "Automatic");
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
int value = -1;
assert_int_equal(option_num, 24);
assert_int_equal(value, 0);
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
int value = -1;
assert_int_equal(option_num, 24);
assert_int_equal(value, 0);
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
int value = -1;
assert_int_equal(option_num, 24);
assert_int_equal(value, 0);
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
int value = -1;
assert_int_equal(option_num, 24);
assert_int_equal(value, 0);
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
char value[50] = {0};
assert_int_equal(option_num, 24);
assert_string_equal(value, "None");
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
int value = -1;
assert_int_equal(option_num, 24);
assert_int_equal(value, 0);
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
char value[50] = {0};
assert_int_equal(option_num, 24);
assert_string_equal(value, "None");
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
int value = -1;
assert_int_equal(option_num, 24);
assert_int_equal(value, 0);
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
int value = -1;
assert_int_equal(option_num, 24);
assert_int_equal(value, 0);
+
free_handler(h);
h = NULL;
}
response* resp = (response*) *state;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_get_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_get_option);
handler* h = init_handler();
int option_num = 0;
int value = -1;
assert_int_equal(option_num, 24);
assert_int_equal(value, 140);
+
free_handler(h);
h = NULL;
}
will_return(__wrap_kds_s2000w_client_get_metadata, 0);
will_return(mock_response, response_list[0]);
will_return(__wrap_kds_s2000w_client_delete_image, 0);
+ expect_function_call(__wrap_kds_s2000w_client_start_scan);
+ expect_function_call(__wrap_kds_s2000w_client_status_session);
+ expect_function_call(__wrap_kds_s2000w_client_get_image);
+ expect_function_call(__wrap_kds_s2000w_client_get_metadata);
+ expect_function_call(__wrap_kds_s2000w_client_delete_image);
handler* h = init_handler();
const char* test_config = "{\"Configuration\": { \"ColorMode\": \"Color\" } }";
h->current_scanner_config = json_tokener_parse(test_config);
resp_set_option->code = 200;
will_return(mock_response, resp_set_option);
will_return(__wrap_kds_s2000w_client_set_option, 0);
+ expect_function_call(__wrap_kds_s2000w_client_start_scan);
+ expect_function_call(__wrap_kds_s2000w_client_status_session);
+ expect_function_call(__wrap_kds_s2000w_client_get_image);
+ expect_function_call(__wrap_kds_s2000w_client_get_metadata);
+ expect_function_call(__wrap_kds_s2000w_client_delete_image);
+ expect_function_call(__wrap_kds_s2000w_client_close_session);
+ expect_function_call(__wrap_kds_s2000w_client_open_session);
+ expect_function_call(__wrap_kds_s2000w_client_set_option);
handler* h = init_handler();
const char* test_config = "{\"Configuration\": { \"ColorMode\": \"Color\" } }";
h->current_scanner_config = json_tokener_parse(test_config);
resp->size = 0;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_stop_scan, 0);
+ expect_function_call(__wrap_kds_s2000w_client_stop_scan);
handler* h = init_handler();
_sane_kds_s2000w_net_cancel(h);
resp->size = 28;
will_return(mock_response, resp);
will_return(__wrap_kds_s2000w_client_open_session, 0);
+ expect_function_call(__wrap_kds_s2000w_client_open_session);
void** hlist = malloc(sizeof(void*));
SANE_Status status = _sane_kds_s2000w_net_open("kds_s2000w_net", hlist);