public void ValidInput_ShouldReturnFormattedValidInput()
        {
            //Arrange

            FakeDelayedFormat      fakeDelayedFormatReg   = new FakeDelayedFormat.Builder().Value("regex").Build();
            FakeDelayedArrayFormat fakeDelayedArrayFormat = new FakeDelayedArrayFormat.Builder().Value(new[] { "sample", "blort" }).Build();
            FakeValidInputResponseAction <string> fakeValidInputResponseAction = new FakeValidInputResponseAction <string> .Builder().Build();

            FormattedValidInput <string> subject = new FormattedValidInput <string>(fakeDelayedFormatReg, fakeDelayedArrayFormat, fakeValidInputResponseAction);

            //Act
            IValidResponse <string> actual = subject.ValidInput();

            //Assert
            fakeDelayedArrayFormat.AssertValueInvoked();
            fakeDelayedFormatReg.AssertValueInvoked();
        }
Exemple #2
0
 public FirstHumanCreation(IValidResponse <IPlayer> validResponse) => _validResponse = validResponse;
Exemple #3
0
 public GameModeSelection(IValidResponse <IGameMode> validResponse) => _validResponse = validResponse;
 public Builder ValidInput(IValidResponse <T> expected)
 {
     _validInputItem.UpdateInvocation(expected);
     return(this);
 }
 public HumanVsComputerGameMode(IValidResponse <IPlayerOrder> validResponse, IPlayerCreation humanCreation, IPlayerCreation computerCreation)
 {
     _validResponse    = validResponse;
     _humanCreation    = humanCreation;
     _computerCreation = computerCreation;
 }
Exemple #6
0
 public HumanMoveInput(IValidResponse <IGlyph> validResponse, IWriter writer)
 {
     _validResponse = validResponse;
     _writer        = writer;
 }