public void Record_SetBytes_Null() { Assert.Throws <ArgumentNullException>(() => { var field = new PwSafe.Record(PwSafe.RecordType.Title); field.SetBytes(null); }); }
public void Record_SetBytes() { var field = new PwSafe.Record(PwSafe.RecordType.Title); field.SetBytes(new byte[] { 0x00, 0xFF }); Assert.Equal("00-FF", BitConverter.ToString(field.GetBytes())); }
public void Record_New() { var field = new PwSafe.Record(PwSafe.RecordType.Title) { Text = "Test" }; Assert.Equal("Test", field.Text); }
public void Record_New_WrongType() { Assert.Throws <FormatException>(() => { var field = new PwSafe.Record(PwSafe.RecordType.Title) { Time = DateTime.Now }; }); }
public void Record_New_Autotype() { var field = new PwSafe.Record(PwSafe.RecordType.Autotype); Assert.Equal(@"\u\t\p\n", field.Text); }