6 #include <tp-account-widgets/tpaw-irc-server.h>
8 #include "test-helper.h"
9 #include "test-irc-helper.h"
12 test_tpaw_irc_server_new (void)
14 TpawIrcServer
*server
;
16 server
= tpaw_irc_server_new ("test.localhost", 6667, TRUE
);
17 check_server (server
, "test.localhost", 6667, TRUE
);
19 g_object_unref (server
);
23 test_property_change (void)
25 TpawIrcServer
*server
;
27 server
= tpaw_irc_server_new ("test.localhost", 6667, TRUE
);
28 g_assert (server
!= NULL
);
31 "address", "test2.localhost",
36 check_server (server
, "test2.localhost", 6668, FALSE
);
38 g_object_unref (server
);
41 static gboolean modified
= FALSE
;
44 modified_cb (TpawIrcServer
*server
,
51 test_modified_signal (void)
53 TpawIrcServer
*server
;
55 server
= tpaw_irc_server_new ("test.localhost", 6667, TRUE
);
56 g_assert (server
!= NULL
);
58 g_signal_connect (server
, "modified", G_CALLBACK (modified_cb
), NULL
);
61 g_object_set (server
, "address", "test2.localhost", NULL
);
64 g_object_set (server
, "address", "test2.localhost", NULL
);
68 g_object_set (server
, "port", 6668, NULL
);
71 g_object_set (server
, "port", 6668, NULL
);
75 g_object_set (server
, "ssl", FALSE
, NULL
);
78 g_object_set (server
, "ssl", FALSE
, NULL
);
81 g_object_unref (server
);
90 test_init (argc
, argv
);
92 g_test_add_func ("/irc-server/new", test_tpaw_irc_server_new
);
93 g_test_add_func ("/irc-server/property-change", test_property_change
);
94 g_test_add_func ("/irc-server/modified-signal", test_modified_signal
);
96 result
= g_test_run ();