6 #include "gtest/gtest.h"
8 TEST(FlMethodResponseTest, Success) {
10 g_autoptr(FlMethodSuccessResponse) response =
17 TEST(FlMethodResponseTest, Error) {
18 g_autoptr(FlMethodErrorResponse) response =
25 TEST(FlMethodResponseTest, ErrorMessage) {
26 g_autoptr(FlMethodErrorResponse) response =
33 TEST(FlMethodResponseTest, ErrorDetails) {
35 g_autoptr(FlMethodErrorResponse) response =
44 TEST(FlMethodResponseTest, ErrorMessageAndDetails) {
46 g_autoptr(FlMethodErrorResponse) response =
55 TEST(FlMethodResponseTest, NotImplemented) {
56 g_autoptr(FlMethodNotImplementedResponse) response =
60 EXPECT_TRUE(FL_IS_METHOD_NOT_IMPLEMENTED_RESPONSE(response));
63 TEST(FlMethodResponseTest, SuccessGetResult) {
65 g_autoptr(FlMethodSuccessResponse) response =
67 g_autoptr(GError)
error =
nullptr;
70 ASSERT_NE(
result,
nullptr);
71 EXPECT_EQ(
error,
nullptr);
76 TEST(FlMethodResponseTest, ErrorGetResult) {
77 g_autoptr(FlMethodErrorResponse) response =
79 g_autoptr(GError)
error =
nullptr;
82 EXPECT_EQ(
result,
nullptr);
87 TEST(FlMethodResponseTest, NotImplementedGetResult) {
88 g_autoptr(FlMethodNotImplementedResponse) response =
90 g_autoptr(GError)
error =
nullptr;
93 EXPECT_EQ(
result,
nullptr);