Package org.fcrepo.server.journal.readerwriter.multicast.rmi

Examples of org.fcrepo.server.journal.readerwriter.multicast.rmi.RmiTransport.openFile()


            RemoteException {
        MockRmiJournalReceiver receiver = new MockRmiJournalReceiver();
        RmiTransport transport =
                new RmiTransport(parameters, CRUCIAL, parent, receiver);

        transport.openFile("someHash", "aFileName", new Date());
        assertEquals(1, receiver.howManyCallsToOpenFile());

        transport.closeFile();
        assertEquals(1, receiver.howManyCallsToClosefile());
    }
View Full Code Here


    public void testOpenCloseShutdownSequence() throws JournalException,
            IOException {
        startMockRmiJournalReceiver();
        RmiTransport transport = new RmiTransport(parameters, CRUCIAL, parent);

        transport.openFile("someHash", "aFileName", new Date());
        assertCorrectNumberOfCalls(1, 0, 0);

        transport.closeFile();
        assertCorrectNumberOfCalls(1, 1, 1);
View Full Code Here

            IOException, XMLStreamException {
        startMockRmiJournalReceiver();
        parameters.put(RmiTransport.PARAMETER_BUFFER_SIZE, "100");
        RmiTransport transport = new RmiTransport(parameters, CRUCIAL, parent);

        transport.openFile("someHash", "aFileName", new Date());
        assertCorrectNumberOfCalls(1, 1, 0);

        XMLEventFactory factory = XMLEventFactory.newInstance();
        QName name1 = new QName("junkyElement1");
        QName name2 = new QName("junkyElement12");
View Full Code Here

    @Test(expected = JournalException.class)
    public void testReceiverThrowsException() throws IOException,
            JournalException {
        startMockRmiJournalReceiver(true);
        RmiTransport transport = new RmiTransport(parameters, CRUCIAL, parent);
        transport.openFile("someHash", "aFileName", new Date());
        fail("Expected an exception.");
    }

    private void startMockRmiJournalReceiver() throws IOException {
        startMockRmiJournalReceiver(false);
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.