Exemplo n.º 1
0
 public IObservable <string> Execute(CesarInput parameter)
 {
     return(SplitIntoCharacters(parameter.Value)
            .Select(character => IncrementCharacter(character, parameter.Key))
            .Switch()
            .Buffer(int.MaxValue)
            .Select(characters => new string(characters.ToArray())));
 }
 public CesarAlgorithmTests()
 {
     _decryptedInput = new CesarInput {
         Key = 1
     };
     _encryptedInput = new CesarInput {
         Key = -1
     };
     _something  = "Random something here.";
     _repository = BuildRepository();
     _instance   = new CesarAlgorithm(_repository.Object);
 }