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

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


    expect(fileEntry.toURI()).andReturn(new URI("file:./"));

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

    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
View Full Code Here


    expect(fileEntry.toURI()).andReturn(new URI("file:./"));

    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,
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.