Home | History | Annotate | Download | only in commands

Lines Matching refs:instance

20   CommandInstance instance{"robot.speak", Command::Origin::kCloud, *params};
23 instance.Complete(*CreateDictionaryValue("{'foo': 239}"), nullptr));
25 EXPECT_EQ("", instance.GetID());
26 EXPECT_EQ("robot.speak", instance.GetName());
27 EXPECT_EQ(Command::Origin::kCloud, instance.GetOrigin());
29 instance.GetParameters());
30 EXPECT_JSON_EQ("{'foo': 239}", instance.GetResults());
37 CommandInstance instance{"base.reboot", Command::Origin::kLocal, {}};
38 instance.SetID("command_id");
39 EXPECT_EQ("command_id", instance.GetID());
54 auto instance = CommandInstance::FromJson(json.get(), Command::Origin::kCloud,
57 EXPECT_EQ("abcd", instance->GetID());
58 EXPECT_EQ("robot.jump", instance->GetName());
59 EXPECT_EQ("comp1.comp2", instance->GetComponent());
61 instance->GetParameters());
66 auto instance = CommandInstance::FromJson(json.get(), Command::Origin::kCloud,
68 EXPECT_EQ("base.reboot", instance->GetName());
69 EXPECT_JSON_EQ("{}", instance->GetParameters());
75 auto instance = CommandInstance::FromJson(json.get(), Command::Origin::kCloud,
77 EXPECT_EQ(nullptr, instance.get());
84 auto instance = CommandInstance::FromJson(json.get(), Command::Origin::kCloud,
86 EXPECT_EQ(nullptr, instance.get());
96 auto instance = CommandInstance::FromJson(json.get(), Command::Origin::kCloud,
98 EXPECT_EQ(nullptr, instance.get());
113 auto instance = CommandInstance::FromJson(json.get(), Command::Origin::kCloud,
115 EXPECT_TRUE(instance->SetProgress(*CreateDictionaryValue("{'progress': 15}"),
117 EXPECT_TRUE(instance->SetProgress(*CreateDictionaryValue("{'progress': 15}"),
119 instance->SetID("testId");
120 EXPECT_TRUE(instance->Complete(*CreateDictionaryValue("{'testResult': 17}"),
130 auto converted = instance->ToJson();
141 auto instance = CommandInstance::FromJson(json.get(), Command::Origin::kCloud,
143 instance->SetID("testId");
147 instance->Abort(error.get(), nullptr);
157 auto converted = instance->ToJson();