Search in sources :

Example 16 with Session

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);
}
Also used : Session(org.openntf.domino.Session) Test(org.junit.Test)

Example 17 with Session

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);
}
Also used : Database(org.openntf.domino.Database) View(org.openntf.domino.View) Session(org.openntf.domino.Session) Test(org.junit.Test)

Example 18 with Session

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);
}
Also used : Database(org.openntf.domino.Database) Session(org.openntf.domino.Session) Test(org.junit.Test)

Example 19 with Session

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);
}
Also used : View(org.openntf.domino.View) Session(org.openntf.domino.Session) Test(org.junit.Test)

Example 20 with Session

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);
}
Also used : Agent(org.openntf.domino.Agent) Database(org.openntf.domino.Database) Session(org.openntf.domino.Session) Test(org.junit.Test)

Aggregations

Session (org.openntf.domino.Session)101 Database (org.openntf.domino.Database)73 Document (org.openntf.domino.Document)28 Test (org.junit.Test)25 View (org.openntf.domino.View)20 DbDirectory (org.openntf.domino.DbDirectory)11 ArrayList (java.util.ArrayList)10 DocumentCollection (org.openntf.domino.DocumentCollection)7 Vector (java.util.Vector)5 ViewEntry (org.openntf.domino.ViewEntry)5 IOException (java.io.IOException)4 LinkedHashMap (java.util.LinkedHashMap)4 Map (java.util.Map)4 NotesException (lotus.domino.NotesException)4 Item (org.openntf.domino.Item)4 Date (java.util.Date)3 HashMap (java.util.HashMap)3 List (java.util.List)3 Agent (org.openntf.domino.Agent)3 NoteCollection (org.openntf.domino.NoteCollection)3