public void SetLoginInformationIconTest() { // Arrange byte[] derivedKey = new byte[16] { 111, 222, 31, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 104, 15, 16 }; SymmetricKeyAlgorithm ska = SymmetricKeyAlgorithm.GenerateNew(SymmetricEncryptionAlgorithm.AES_CTR); LoginInformationSecret loginInformationSecret = new LoginInformationSecret(loginInformation, "does not matter", ska, derivedKey); byte[] newIcon = new byte[] { 1, 2, 44, 55, 66, 33, 89, 23, 222, 111, 100, 99, 45, 127, 198, 255 }; // Act bool shouldBeTrue = loginInformationSecret.SetIcon(newIcon, derivedKey); byte[] loginInformationIcon2 = loginInformationSecret.GetIcon(derivedKey); bool shouldBeFalse = loginInformationSecret.SetIcon(newIcon, new byte[] { 13, 129, 3, 99, 134, 255, 0 }); // Assert Assert.IsTrue(shouldBeTrue); Assert.IsFalse(shouldBeFalse); CollectionAssert.AreEqual(newIcon, loginInformationIcon2); }