示例#1
0
        public void SetGetCategoryTest()
        {
            // 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");
            string newCategory = "Discussions";

            // Act
            li.UpdateCategory(newCategory);

            // Assert
            Assert.AreEqual(newCategory, li.GetCategory());
        }
示例#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),
     });
 }