Make attributes private in PwGroup and PwEntry

This commit is contained in:
J-Jamet committed 2018-03-23 21:30:50 +01:00
1 parent cf93044d3f
commit b0cfd4292f
15 files changed
+324 -147

No files matched your search

@@ -34,24 +34,24 @@ public class PwEntryTestV4 extends TestCase {
public void testAssign() {
PwEntryV4 entry = new PwEntryV4();
entry.additional = "test223";
entry.setAdditional("test223");
entry.autoType = entry.new AutoType();
entry.autoType.defaultSequence = "1324";
entry.autoType.enabled = true;
entry.autoType.obfuscationOptions = 123412432109L;
entry.autoType.put("key", "value");
entry.setAutoType(entry.new AutoType());
entry.getAutoType().defaultSequence = "1324";
entry.getAutoType().enabled = true;
entry.getAutoType().obfuscationOptions = 123412432109L;
entry.getAutoType().put("key", "value");
entry.backgroupColor = "blue";
entry.binaries.put("key1", new ProtectedBinary(false, new byte[] {0,1}));
entry.customIcon = new PwIconCustom(UUID.randomUUID(), new byte[0]);
entry.foregroundColor = "red";
entry.history.add(new PwEntryV4());
entry.icon = new PwIconStandard(5);
entry.overrideURL = "override";
entry.parent = new PwGroupV4();
entry.setBackgroupColor("blue");
entry.putProtectedBinary("key1", new ProtectedBinary(false, new byte[] {0,1}));
entry.setCustomIcon(new PwIconCustom(UUID.randomUUID(), new byte[0]));
entry.setForegroundColor("red");
entry.addToHistory(new PwEntryV4());
entry.setIcon(new PwIconStandard(5));
entry.setOverrideURL("override");
entry.setParent(new PwGroupV4());
entry.addField("key2", new ProtectedString(false, "value2"));
entry.url = "http://localhost";
entry.setUrl("http://localhost");
entry.setUUID(UUID.randomUUID());
PwEntryV4 target = new PwEntryV4();
@@ -32,19 +32,21 @@ public class EntryV4 extends TestCase {
db.historyMaxItems = 2;
PwEntryV4 entry = new PwEntryV4();
entry.setTitle("Title1", db);
entry.setUsername("User1", db);
entry.startToDecodeReference(db);
entry.setTitle("Title1");
entry.setUsername("User1");
entry.createBackup(db);
entry.setTitle("Title2", db);
entry.setUsername("User2", db);
entry.setTitle("Title2");
entry.setUsername("User2");
entry.createBackup(db);
entry.setTitle("Title3", db);
entry.setUsername("User3", db);
entry.setTitle("Title3");
entry.setUsername("User3");
entry.createBackup(db);
PwEntryV4 backup = entry.history.get(0);
PwEntryV4 backup = entry.getHistory().get(0);
entry.endToDecodeReference(db);
assertEquals("Title2", backup.getTitle());
assertEquals("User2", backup.getUsername());
}