示例#1
0
        public void SetGetIconTest()
        {
            // Arrange
            LoginInformation li = new LoginInformation(newTitle: "Random forum", newUrl: "https://somedomain.com", newEmail: "*****@*****.**", newUsername: "******", newPassword: "******",
                                                       newNotes: "some boring notes for someone", newMFA: "otpauth://totp/DRAGON?secret=SECRET", newIcon: new byte[] { 1, 2, 3, 45 }, newCategory: "Forums", newTags: "Hobbies");

            byte[] newIcon = new byte[] { 4, 127, 0, 255, 1, 2, 3, 45 };

            // Act
            li.UpdateIcon(newIcon);

            // Assert
            CollectionAssert.AreEqual(newIcon, li.GetIcon());
        }
示例#2
0
 public static LoginSimplified TurnIntoEditable(LoginInformation loginInformation, int zeroBasedIndexNumber)
 {
     return(new LoginSimplified()
     {
         zeroBasedIndexNumber = zeroBasedIndexNumber,
         IsSecure = false,
         Title = loginInformation.GetTitle(),
         URL = loginInformation.GetURL(),
         Email = loginInformation.GetEmail(),
         Username = loginInformation.GetUsername(),
         Password = loginInformation.GetPassword(),
         Notes = loginInformation.GetNotes(),
         Icon = loginInformation.GetIcon(),
         Category = loginInformation.GetCategory(),
         Tags = loginInformation.GetTags(),
         CreationTime = loginInformation.GetCreationTime().ToString("s", System.Globalization.CultureInfo.InvariantCulture),
         ModificationTime = loginInformation.GetModificationTime().ToString("s", System.Globalization.CultureInfo.InvariantCulture),
     });
 }