Esempio n. 1
0
        public void SetGetUsernameTest()
        {
            // Arrange
            LoginInformation li          = new LoginInformation(newTitle: "Random forum", newUrl: "https://somedomain.com", newEmail: "*****@*****.**", newUsername: "******", newPassword: "******");
            string           newUsername = "******";

            // Act
            li.UpdateUsername(newUsername);

            // Assert
            Assert.AreEqual(newUsername, li.GetUsername());
        }
Esempio n. 2
0
        public void ModificationTimeTest()
        {
            // Arrange
            LoginInformation li = new LoginInformation(newTitle: "Random forum", newUrl: "https://somedomain.com", newEmail: "*****@*****.**", newUsername: "******", newPassword: "******");

            // Act
            DateTimeOffset modificationTime1 = li.GetModificationTime();

            Thread.Sleep(1100);
            li.UpdateUsername("dragon2");
            DateTimeOffset modificationTime2 = li.GetModificationTime();

            // Assert
            Assert.Greater(modificationTime2, modificationTime1);
        }