Exemple #1
0
        public void DecryptTextProblem59_Problem59Text_ReturnsCorrectResult()
        {
            // Arrange
            var asciiValues        = TestData.CipherTextProblem59();
            var expectedWordInText = "Euler";

            // Act
            var result = TestDataHelper.DecryptTextProblem59(asciiValues);

            // Assert
            Encoding.ASCII.GetString(result.ToArray()).Should().Contain(expectedWordInText);
        }
Exemple #2
0
        public static long GetSolutionOfProblem59()
        {
            var decrypteddText = TestDataHelper.DecryptTextProblem59(TestData.TestData.CipherTextProblem59());

            return(decrypteddText.Select(byteValue => (int)byteValue).Sum());
        }