package org.openntf.domino.tests.ntf;

import org.openntf.domino.Database;
import org.openntf.domino.Session;
import org.openntf.domino.utils.Factory;
import org.openntf.domino.utils.Factory.SessionType;
import org.openntf.domino.utils.TestRunnerUtil;

public class ServerPathTest implements Runnable {
	private long marktime;

	public static void main(final String[] args) {
		TestRunnerUtil.runAsDominoThread(new ServerPathTest(), TestRunnerUtil.NATIVE_SESSION);
	}

	public void timelog(final String message) {
		long curtime = System.nanoTime();
		long elapsed = curtime - marktime;
		marktime = curtime;
		System.out.println(elapsed / 1000000 + " ms: " + message);
	}

	public ServerPathTest() {
		// whatever you might want to do in your constructor, but stay away from Domino objects
	}

	@Override
	public void run() {
		Session session = Factory.getSession(SessionType.FULL_ACCESS);
		Database db = session.getDatabase("CN=Avatar/O=REDPILL", "log.nsf");
		System.out.println(db.getApiPath());
	}

}
