public void WritesReadsRunStepsCommand() { var message = CommandRequestBuilder.Build(CommandType.Run, stepsToRun: 1); var commandRequest = message.GetRequest(new CommandRequest()); Assert.Equal(CommandType.Run, commandRequest.Command); Assert.Equal((uint)1, commandRequest.StepsToRun); }
public void WritesReadsRunToBodyStepCommand() { var message = CommandRequestBuilder.Build(CommandType.Run, runToBodyStep: true); var commandRequest = message.GetRequest(new CommandRequest()); Assert.Equal(CommandType.Run, commandRequest.Command); Assert.True(commandRequest.RunToBodyStep); }
public void WritesReadsConfigurationCommand() { var systemConfig = new SystemConfiguration() { BrainStepsPerBodyStep = 13 }; var message = CommandRequestBuilder.Build(CommandType.Configure, configuration: new CoreConfiguration(systemConfig)); CommandRequest commandRequest = message.GetRequest(new CommandRequest()); Assert.Equal(CommandType.Configure, commandRequest.Command); Assert.Equal(systemConfig.ToJsonString(), commandRequest.Configuration.SystemConfiguration); }
public void StepsToRunWithRunToBodyStepFails() { Assert.Throws <InvalidOperationException>(() => CommandRequestBuilder.Build(CommandType.Run, stepsToRun: 10, runToBodyStep: true)); }
public void WritesReadsCommand() { var message = CommandRequestBuilder.Build(CommandType.Run); Assert.Equal(CommandType.Run, message.GetRequest(new CommandRequest()).Command); }