public void HostPwEntryWithAndWithoutReferencedFields(String title) { var expectedConnectionMethods = new Collection <ConnectionMethodType>() { ConnectionMethodType.PuttySSH, ConnectionMethodType.WinSCP }; var entry = new HostPwEntry( PwDatabaseUtils.FindEntryByTitle(this.pwDatabase, title, true), this.pwDatabase, this.fieldsMapper ); Assert.AreEqual("root", entry.GetUsername()); Assert.AreEqual("123456789", entry.GetPassword()); Assert.AreEqual("192.168.0.110", entry.IPAddress); CollectionAssert.AreEquivalent(expectedConnectionMethods, entry.ConnectionMethods); Assert.IsTrue(entry.HasIPAddress); Assert.IsTrue(entry.HasConnectionMethods); }
public void HostPwEntry() { var expectedConnectionMethods = new Collection <ConnectionMethodType>() { ConnectionMethodType.RemoteDesktop, ConnectionMethodType.RemoteDesktopConsole, }; var entry = new HostPwEntry( PwDatabaseUtils.FindEntryByTitle(this.pwDatabase, "Windows host sample", true), this.pwDatabase, this.fieldsMapper ); Assert.AreEqual("Administrator", entry.GetUsername()); Assert.AreEqual("12345678", entry.GetPassword()); Assert.AreEqual("192.168.0.100", entry.IPAddress); CollectionAssert.AreEquivalent(expectedConnectionMethods, entry.ConnectionMethods); Assert.IsTrue(entry.HasIPAddress); Assert.IsTrue(entry.HasConnectionMethods); }