Examples of ErrorReporingToSystemErr


Examples of fi.luomus.commons.reporting.ErrorReporingToSystemErr

    try {
      String configFile = resolveConfigFile();
      System.out.println(this.getClass().getCanonicalName() + " being initialized using configfile " + configFile);
      this.config = new ConfigReader(configFile);
      if (this.config.developmentMode()) {
        this.errorReporter = new ErrorReporingToSystemErr();
      } else {
        this.errorReporter = new ErrorReporterViaEmail(this.config);
      }
      initOnlyOnce();
      applicationInit();
View Full Code Here

Examples of fi.luomus.commons.reporting.ErrorReporingToSystemErr

            "</SimpleDarwinRecordSet>";

    @Test
    public void testStartStop() throws Exception {
        final AtomicBoolean called = new AtomicBoolean(false);
        DocumentQueueService service = new DocumentQueueService(null, null, new ErrorReporingToSystemErr()) {
            @Override
            public void saveDocuments() {
                called.set(true);
            }
        };
View Full Code Here

Examples of fi.luomus.commons.reporting.ErrorReporingToSystemErr

    @Test
    public void testEmptySaveDocuments() throws Exception {
        final List<FeedEntry> documentQueue = new ArrayList<FeedEntry>();
        MockDAO dao = new MockDAO(documentQueue);
        MockFeedReaderClient feedReaderClient = new MockFeedReaderClient(documentQueue);
        DocumentQueueService service = new DocumentQueueService(dao, feedReaderClient, new ErrorReporingToSystemErr());

        service.saveDocuments();
        assertEquals(0, documentQueue.size());
        assertEquals(0, dao.savedDocuments.size());
    }
View Full Code Here

Examples of fi.luomus.commons.reporting.ErrorReporingToSystemErr

    public void testSaveDocument() throws Exception {
        final List<FeedEntry> documentQueue = new ArrayList<FeedEntry>();
        documentQueue.add(new FeedEntry(new URI("http://www.foo.com"), "id", 1));
        MockDAO dao = new MockDAO(documentQueue);
        MockFeedReaderClient feedReaderClient = new MockFeedReaderClient(documentQueue);
        DocumentQueueService service = new DocumentQueueService(dao, feedReaderClient, new ErrorReporingToSystemErr());

        service.saveDocuments();
        assertEquals(0, dao.getDocumentQueue(50).size());
        assertEquals(1, dao.savedDocuments.size());
        assertEquals(SINGLE_ENTRY, dao.savedDocuments.get(0));
View Full Code Here

Examples of fi.luomus.commons.reporting.ErrorReporingToSystemErr

        for (int i = 0; i < DocumentQueueService.DOCUMENTS_PER_CYCLE; i++) {
            documentQueue.add(new FeedEntry(new URI("http://www.foo.com/" + i), "id", 1));
        }
        MockDAO dao = new MockDAO(documentQueue);
        MockFeedReaderClient feedReaderClient = new MockFeedReaderClient(documentQueue);
        DocumentQueueService service = new DocumentQueueService(dao, feedReaderClient, new ErrorReporingToSystemErr());

        service.saveDocuments();
        assertEquals(0, dao.getDocumentQueue(50).size());
        assertEquals(DocumentQueueService.DOCUMENTS_PER_CYCLE, dao.savedDocuments.size());
    }
View Full Code Here

Examples of fi.luomus.commons.reporting.ErrorReporingToSystemErr

        for (int i = 0; i < DocumentQueueService.DOCUMENTS_PER_CYCLE + 1; i++) {
            documentQueue.add(new FeedEntry(new URI("http://www.foo.com/" + i), "id", 1));
        }
        MockDAO dao = new MockDAO(documentQueue);
        MockFeedReaderClient feedReaderClient = new MockFeedReaderClient(documentQueue);
        DocumentQueueService service = new DocumentQueueService(dao, feedReaderClient, new ErrorReporingToSystemErr());

        service.saveDocuments();
        assertEquals(1, dao.getDocumentQueue(50).size());
        assertEquals(DocumentQueueService.DOCUMENTS_PER_CYCLE, dao.savedDocuments.size());
View Full Code Here

Examples of fi.luomus.commons.reporting.ErrorReporingToSystemErr

    public void entriesSaved() throws Exception {
        FeedReaderData data = new FeedReaderData();
        data.setFeedName("mock");
        data.setUri(new URI("http://www.mock.com"));
        data.setStartAtTimestamp(0L);
        data.setErrorReporter(new ErrorReporingToSystemErr());
        MockDAO mockDAO = new MockDAO();
        MockFeedReaderClient mockFeedReaderClient = new MockFeedReaderClient();
        FeedReaderService reader = new FeedReaderWithMockSeq(data, mockFeedReaderClient, mockDAO);

        reader.insertFromFeedToDatabase();
View Full Code Here

Examples of fi.luomus.commons.reporting.ErrorReporingToSystemErr

    public void sequenceUpdated() throws Exception {
        FeedReaderData data = new FeedReaderData();
        data.setFeedName("mock");
        data.setUri(new URI("http://www.mock.com"));
        data.setStartAtTimestamp(0L);
        data.setErrorReporter(new ErrorReporingToSystemErr());
        MockDAO mockDAO = new MockDAO();
        MockFeedReaderClient mockFeedReaderClient = new MockFeedReaderClient();
        FeedReaderWithMockSeq reader = new FeedReaderWithMockSeq(data, mockFeedReaderClient, mockDAO);

        assertNull(mockDAO.sequence);
View Full Code Here

Examples of fi.luomus.commons.reporting.ErrorReporingToSystemErr

    public void sequenceRead() throws Exception {
        FeedReaderData data = new FeedReaderData();
        data.setFeedName("mock");
        data.setUri(new URI("http://www.mock.com"));
        data.setStartAtTimestamp(0L);
        data.setErrorReporter(new ErrorReporingToSystemErr());
        MockDAO mockDAO = new MockDAO();
        MockFeedReaderClient mockFeedReaderClient = new MockFeedReaderClient();
        FeedReaderWithMockSeq reader = new FeedReaderWithMockSeq(data,
                mockFeedReaderClient,
                mockDAO);
View Full Code Here

Examples of fi.luomus.commons.reporting.ErrorReporingToSystemErr

        FeedReaderData data = new FeedReaderData();
        data.setFeedName("mock");
        data.setUri(new URI("http://www.mock.com"));
        data.setStartAtTimestamp(0L);
        data.setErrorReporter(new ErrorReporingToSystemErr());
        MockDAO mockDAO = new MockDAO();
        mockDAO.setLastReadSequence(0L);
        MockFeedReaderClient mockFeedReaderClient = new MockFeedReaderClient();
        FeedReaderWithMockSeq reader = new FeedReaderWithMockSeq(data,
                mockFeedReaderClient,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.