[command] Add ignoringDisable decorator (#4305)

This commit is contained in:
Starlight220
2022-06-24 20:52:53 +03:00
committed by GitHub
parent aa221597bc
commit fe3c24b1ee
8 changed files with 286 additions and 0 deletions

View File

@@ -54,6 +54,19 @@ TEST_F(CommandDecoratorTest, Until) {
EXPECT_FALSE(scheduler.IsScheduled(&command));
}
TEST_F(CommandDecoratorTest, IgnoringDisable) {
CommandScheduler scheduler = GetScheduler();
auto command = RunCommand([] {}, {}).IgnoringDisable(true);
SetDSEnabled(false);
scheduler.Schedule(command.get());
scheduler.Run();
EXPECT_TRUE(scheduler.IsScheduled(command.get()));
}
TEST_F(CommandDecoratorTest, BeforeStarting) {
CommandScheduler scheduler = GetScheduler();