public void GivenEncryptedData_WhenDecryptingData_ThenDecryptsData() { var expectedMessage = "hello world"; var expectedMessageBytes = Encoding.UTF8.GetBytes(expectedMessage); RSAEncryption rsaEncryption = RSAEncryption.CreateContainer("SomeContainer"); var encryptedMessageBytes = rsaEncryption.EncryptData(expectedMessageBytes); var actualMessage = Encoding.UTF8.GetString(rsaEncryption.DecryptData(encryptedMessageBytes)); Assert.That(actualMessage, Is.EqualTo(expectedMessage)); }