public void testEquals() { LoginData testObjectOne = new LoginData("test", SecureStringConverter.convertFromString("test"), "test.de"); LoginData testObjectTwo = new LoginData("test", SecureStringConverter.convertFromString("test"), "test.de"); Assert.True(testObjectOne.Equals(testObjectTwo)); }
public void testNotEqualOperator() { LoginData testObjectOne = new LoginData("test", SecureStringConverter.convertFromString("test"), "test.de"); LoginData testObjectTwo = new LoginData("test", SecureStringConverter.convertFromString("test"), "test.de"); Assert.False(testObjectOne != testObjectTwo); }
public void testDomainGetter() { LoginData testobject = new LoginData("test", SecureStringConverter.convertFromString("test"), "test.de"); Assert.That(testobject.getDomain(), Is.EqualTo("test.de")); }
public void testPasswordGetter() { LoginData testobject = new LoginData("test", SecureStringConverter.convertFromString("test"), "test.de"); Assert.That(Marshal.PtrToStringUni(Marshal.SecureStringToCoTaskMemUnicode(testobject.getPassword())), Is.EqualTo("test")); }
public void testConvertToSecureStringEmptyString() { SecureString securedString = SecureStringConverter.convertFromString(""); Assert.AreEqual("", Marshal.PtrToStringUni(Marshal.SecureStringToCoTaskMemUnicode(securedString))); }