use of org.openntf.domino.Session in project org.openntf.domino by OpenNTF.
the class SerializeTest method testSessionReboot.
@Test
public void testSessionReboot() throws IOException, ClassNotFoundException {
Session sess = Factory.getSession(SessionType.CURRENT);
Session ret = test(sess, true);
assertFalse(sess == ret);
sess = Factory.getSession(SessionType.CURRENT_FULL_ACCESS);
ret = test(sess, true);
assertFalse(sess == ret);
sess = Factory.getSession(SessionType.FULL_ACCESS);
ret = test(sess, true);
assertFalse(sess == ret);
}
use of org.openntf.domino.Session in project org.openntf.domino by OpenNTF.
the class SerializeTest method testViewNameConflict.
@Test
public void testViewNameConflict() throws IOException, ClassNotFoundException {
Session sess = Factory.getSession(SessionType.CURRENT);
Database db = sess.getDatabase("log.nsf");
View vw = db.getView("name1");
assertNotNull("you need 4 views for this test in your log.nsf: 'name1|sameAlias','name2|sameAlias', 'sameName|alias1', 'sameName|alias2'", vw);
View ret = test(vw, true);
assertFalse(vw == ret);
vw = db.getView("name2");
ret = test(vw, true);
assertFalse(vw == ret);
vw = db.getView("alias1");
ret = test(vw, true);
assertFalse(vw == ret);
vw = db.getView("alias2");
ret = test(vw, true);
assertFalse(vw == ret);
}
use of org.openntf.domino.Session in project org.openntf.domino by OpenNTF.
the class SerializeTest method testDatabase.
@Test
public void testDatabase() throws IOException, ClassNotFoundException {
Session sess = Factory.getSession(SessionType.CURRENT);
Database db = sess.getDatabase("log.nsf");
Database ret = test(db, false);
assertTrue(db == ret);
}
use of org.openntf.domino.Session in project org.openntf.domino by OpenNTF.
the class SerializeTest method testView.
@Test
public void testView() throws IOException, ClassNotFoundException {
Session sess = Factory.getSession(SessionType.CURRENT);
View vw = sess.getDatabase("log.nsf").getViews().get(0);
View ret = test(vw, false);
assertTrue(vw == ret);
}
use of org.openntf.domino.Session in project org.openntf.domino by OpenNTF.
the class SerializeTest method testAgentNameConflict.
@Test
public void testAgentNameConflict() throws IOException, ClassNotFoundException {
Session sess = Factory.getSession(SessionType.CURRENT);
Database db = sess.getDatabase("log.nsf");
Agent ag = db.getAgent("name1");
assertNotNull("you need 4 agents for this test in your log.nsf: 'name1|sameAlias','name2|sameAlias', 'sameName|alias1', 'sameName|alias2'", ag);
Agent ret = test(ag, true);
assertFalse(ag == ret);
ag = db.getAgent("name2");
ret = test(ag, true);
assertFalse(ag == ret);
ag = db.getAgent("alias1");
ret = test(ag, true);
assertFalse(ag == ret);
ag = db.getAgent("alias2");
ret = test(ag, true);
assertFalse(ag == ret);
}
Aggregations