aboutsummaryrefslogtreecommitdiff
path: root/src/commands/command_queue_unittest.cc
diff options
context:
space:
mode:
authorAlex Vakulenko <avakulenko@google.com>2015-11-23 11:47:49 -0800
committerAlex Vakulenko <avakulenko@google.com>2015-11-24 16:08:24 +0000
commit7e894da1c5fcc4fafa6cc69b612c9c14f78aed51 (patch)
tree1146abefa59cfb4ec2e52d77a01352eb74bb614d /src/commands/command_queue_unittest.cc
parentb069307073861bf34863ebd9798e830a2e1f3424 (diff)
downloadlibweave-7e894da1c5fcc4fafa6cc69b612c9c14f78aed51.tar.gz
Remove object schema parsing in CommandDefinition
The only thing we now care about in CommandDefinition is the "minimalRole" field. Everything else is a black-box which we just forward to the server without any semantic parsing. Also completely removed command visibility support since it no longer applies to trait/component model. BUG: 25841230 Change-Id: Ie8fff57ffada289caa7876c2a53150bb116fd65b Reviewed-on: https://weave-review.googlesource.com/1617 Reviewed-by: Vitaly Buka <vitalybuka@google.com>
Diffstat (limited to 'src/commands/command_queue_unittest.cc')
-rw-r--r--src/commands/command_queue_unittest.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/commands/command_queue_unittest.cc b/src/commands/command_queue_unittest.cc
index 5060071..a9e953e 100644
--- a/src/commands/command_queue_unittest.cc
+++ b/src/commands/command_queue_unittest.cc
@@ -20,11 +20,15 @@ namespace weave {
class CommandQueueTest : public testing::Test {
public:
+ CommandQueueTest() {
+ command_definition_ = CommandDefinition::FromJson({}, nullptr);
+ }
+
std::unique_ptr<CommandInstance> CreateDummyCommandInstance(
const std::string& name,
const std::string& id) {
std::unique_ptr<CommandInstance> cmd{new CommandInstance{
- name, Command::Origin::kLocal, &command_definition_, {}}};
+ name, Command::Origin::kLocal, command_definition_.get(), {}}};
cmd->SetID(id);
return cmd;
}
@@ -39,8 +43,7 @@ class CommandQueueTest : public testing::Test {
CommandQueue queue_;
private:
- CommandDefinition command_definition_{
- ObjectSchema::Create(), ObjectSchema::Create(), ObjectSchema::Create()};
+ std::unique_ptr<CommandDefinition> command_definition_;
};
// Keeps track of commands being added to and removed from the queue_.