Package org.apache.ambari.server.orm.dao

Examples of org.apache.ambari.server.orm.dao.ViewDAO.findAll()


    expect(vDAO.findByName("MY_VIEW{1.0.0}")).andReturn(null);
    expect(vDAO.merge(capture(captureViewEntity))).andReturn(null);
    expect(vDAO.findByName("MY_VIEW{1.0.0}")).andReturn(viewDefinition);

    expect(vDAO.findAll()).andReturn(Collections.<ViewEntity>emptyList());

    // replay mocks
    replay(configuration, viewDir, extractedArchiveDir, viewArchive, archiveDir, entryFile, classesDir,
        libDir, fileEntry, viewJarFile, enumeration, jarEntry, is, fos, vDAO);
View Full Code Here


    Capture<ViewEntity> captureViewEntity = new Capture<ViewEntity>();

    expect(vDAO.findByName("MY_VIEW{1.0.0}")).andReturn(null);
    expect(vDAO.merge(capture(captureViewEntity))).andThrow(new IllegalArgumentException("Expected exception."));

    expect(vDAO.findAll()).andReturn(Collections.<ViewEntity>emptyList());

    // replay mocks
    replay(configuration, viewDir, extractedArchiveDir, viewArchive, archiveDir, entryFile, classesDir,
        libDir, fileEntry, viewJarFile, enumeration, jarEntry, is, fos, vDAO);
View Full Code Here

    expect(libDir.listFiles()).andReturn(new File[]{fileEntry});
    expect(fileEntry.toURI()).andReturn(new URI("file:./"));

    Capture<ViewEntity> captureViewEntity = new Capture<ViewEntity>();

    expect(vDAO.findAll()).andReturn(Collections.<ViewEntity>emptyList());
    vDAO.create(capture(captureViewEntity));

    // replay mocks
    replay(configuration, viewDir, extractedArchiveDir, viewArchive, archiveDir, entryFile, classesDir,
        libDir, fileEntry, viewJarFile, enumeration, jarEntry, is, fos, vDAO);
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.