public void FeederExecutesMoveRightCommandHorizontalStackPositionIncrements() { //Arrange const string expectedPosition = "1"; var stacks = new List <IStack> { new Stack(), new Stack(), new Stack(), new Stack() }; var stackFeeder = new StackFeeder(stacks, string.Empty); //Act stackFeeder.Command("r"); //Assert stackFeeder.Command("s").Should().Be(expectedPosition); }
public void FeederResetsToRestingPosition() { //Arrange const string expectedResult = "0"; var stacks = new List <IStack> { new Stack(), new Stack(), new Stack(), new Stack() }; var stackFeeder = new StackFeeder(stacks, string.Empty); stackFeeder.Command("r"); //Act stackFeeder.Command("q"); //Assert stackFeeder.Command("s").Should().Be(expectedResult); }
public void FeederCanMoveDown() { //Arrange const string expectedResult = "1"; var stacks = new List <IStack> { new Stack(), new Stack(), new Stack(), new Stack() }; var stackFeeder = new StackFeeder(stacks, string.Empty); stackFeeder.Command("r"); //Act stackFeeder.Command("d"); //Assert stackFeeder.Command("b").Should().Be(expectedResult); }
public void FeederCannotMoveUpBinIfNotOnStack() { //Arrange var stacks = new List <IStack> { new Stack(), new Stack(), new Stack(), new Stack() }; var stackFeeder = new StackFeeder(stacks, string.Empty); //Act stackFeeder.Command("u"); }
public void FromStackFourResetToRestingPosition() { //Arrange const string expectedResult = "0"; //Act var stacks = new List <IStack> { new Stack(), new Stack(), new Stack(), new Stack() }; var stackFeeder = new StackFeeder(stacks, string.Empty); var result = stackFeeder.Command("qs"); //Assert result.Should().Be(expectedResult); }
public void FeederExecutesFourRightCommands() { //Arrange const string expectedPosition = "4"; //Act var stacks = new List <IStack> { new Stack(), new Stack(), new Stack(), new Stack() }; var stackFeeder = new StackFeeder(stacks, string.Empty); var result = stackFeeder.Command("rrrrs"); //Assert result.Should().Be(expectedPosition); }
public void FeederCanRetrieveItemCode() { //Arrange const string expectedResult = "c54675890"; var stacks = new List <IStack> { new Stack(), new Stack(), new Stack(), new Stack() }; var stackFeeder = new StackFeeder(stacks, string.Empty); //Act var result = stackFeeder.Command("rdddddi"); //Assert result.Should().Be(expectedResult); }
public void CanQueryStackID() { //Arrange const string expectedPosition = "0"; var stacks = new List <IStack> { new Stack(), new Stack(), new Stack(), new Stack() }; var stackFeeder = new StackFeeder(stacks, string.Empty); //Act var stackPostition = stackFeeder.Command("s"); //Assert stackPostition.Should().Be(expectedPosition); }
public string CanInitialiseStackFromString(string commandSequence) { //Arrange const string stock = "1:4:c54675890:10;1:8:c7867546:5;1:5:c897865:100;3:5:c786765:3;2:5:c445673:10"; var stacks = new List <IStack> { new Stack(), new Stack(), new Stack(), new Stack() }; var stackFeeder = new StackFeeder(stacks, stock); //Act var result = stackFeeder.Command(commandSequence); //Assert return(result); }
public void CanLoadItemInToAStackAtBinPosition() { //Arrange const string expectedProductCode = "c54675890"; const string stock = "1:5:c54675890:10"; var stacks = new List <IStack> { new Stack(), new Stack(), new Stack(), new Stack() }; //Act var stackFeeder = new StackFeeder(stacks, stock); var result = stackFeeder.Command("rdddddi"); //Assert result.Should().Be(expectedProductCode); }