public override Robot CreateRobot(RobotModel model) { Robot robot = new WorkerRobot(model); robot.DecodingProbability = 100; robot.Carrying = 10; return(robot); }
public void SaveRobotStateTest() { //Arrange var robot = new WorkerRobot(null) { BatteryCharge = 30 }; //Act var result = robot.SaveState(); //Assert Assert.Equal(30, result.BatteryCharge); }
public void CreateWorkerRobotTest() { //Arrange var expected = new WorkerRobot(null) { DecodingProbability = 10, Carrying = 20 }; var robotCreator = new WorkerRobotCreator(); //Act var result = robotCreator.CreateRobot(null); //Assert expected.Should().BeEquivalentTo(result); }