public void MasterKeyExpireIsInfinite() { // Assign/Act var db = new Database(TestConstants.BlankKey); // Assert Assert.IsNull(db.MasterKeyExpire); }
public void IsGeneratedByKeePass() { // Assign/Act const string generator = "KeePass"; var db = new Database(TestConstants.BlankKey); // Assert Assert.AreEqual(generator, db.Generator); }
public void MasterKeyChangedDateTimeMatchesCreationDateTime() { Smock.Run(ctx => { // Fakes var utcNow = DateTime.UtcNow; ctx.Setup(() => DateTime.UtcNow).Returns(utcNow); // Assign/Act var db = new Database(TestConstants.BlankKey); // Assert Assert.AreEqual(DateTime.UtcNow, db.MasterKeyChanged); }); }
public void RootGroupNameIsDefaultedIfNotSpecified() { // Assign/Act const string expectedValue = "Root"; var db = new Database(TestConstants.BlankKey); // Assert Assert.AreEqual(expectedValue, db.Root.Name.ToString()); }
public void RootGroupMatchesDatabaseName() { // Assign/Act var db = new Database(TestConstants.BlankKey) { Name = "TestDB" }; // Assert Assert.IsNotNull(db.Root); Assert.AreEqual(db.Name, db.Root.Name.ToString()); }