private static void GetInputForAffineCipher(IEnumerable <string> messages, Storage storage) { Printer.Print(messages.ElementAt(0)); var oddNumberSequence = _oddNumberGenerator.GetNumbersBetween(0, 25); var builder = new StringBuilder(); foreach (var number in oddNumberSequence) { builder.Append($"{number} "); } Printer.Print(builder.ToString()); var oddKey = Reader.Read <int>(); if (NumberValidator.IsOdd(oddKey)) { if (oddNumberSequence.Contains(oddKey)) { storage.AffineKeys.KeyOne = oddKey; } Printer.Print(messages.ElementAt(1)); var randKey = Reader.Read <int>(); if (randKey >= 0 && randKey <= 25) { storage.AffineKeys.KeyTwo = randKey; } } }
public void MyFirstTheory(int value) { Assert.True(numberValidatorSUT.IsOdd(value)); }