summaryrefslogtreecommitdiffstats
path: root/test/test-mock.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-03-05 17:20:27 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-03-05 17:20:27 +0100
commit03739354e074c547d99a6992a7774c3643d17da1 (patch)
tree37091acf1b6101493f9243fbd5b5201be951fdce /test/test-mock.c
parent0483c86add2f496021560b82476d22e2497006be (diff)
downloaduca-03739354e074c547d99a6992a7774c3643d17da1.tar.gz
uca-03739354e074c547d99a6992a7774c3643d17da1.tar.bz2
uca-03739354e074c547d99a6992a7774c3643d17da1.tar.xz
uca-03739354e074c547d99a6992a7774c3643d17da1.zip
Add factory method to create new cameras
Diffstat (limited to 'test/test-mock.c')
-rw-r--r--test/test-mock.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test-mock.c b/test/test-mock.c
index 5340166..a9284cf 100644
--- a/test/test-mock.c
+++ b/test/test-mock.c
@@ -26,6 +26,14 @@ static void on_property_change(gpointer instance, GParamSpec *pspec, gpointer us
*success = TRUE;
}
+static void test_factory()
+{
+ GError *error = NULL;
+ UcaCamera *camera = uca_camera_new("fox994m3a0yxmy", &error);
+ g_assert_error(error, UCA_CAMERA_ERROR, UCA_CAMERA_ERROR_NOT_FOUND);
+ g_assert(camera == NULL);
+}
+
static void test_recording(Fixture *fixture, gconstpointer data)
{
GError *error = NULL;
@@ -150,6 +158,7 @@ int main(int argc, char *argv[])
g_test_init(&argc, &argv, NULL);
g_test_bug_base("http://ufo.kit.edu/ufo/ticket");
+ g_test_add_func("/factory", test_factory);
g_test_add("/recording", Fixture, NULL, fixture_setup, test_recording, fixture_teardown);
g_test_add("/recording/signal", Fixture, NULL, fixture_setup, test_recording_signal, fixture_teardown);
g_test_add("/recording/asynchronous", Fixture, NULL, fixture_setup, test_recording_async, fixture_teardown);