Package org.rhq.enterprise.server.plugins.drift.mongodb.dao

Examples of org.rhq.enterprise.server.plugins.drift.mongodb.dao.FileDAO.findOne()


        driftServer.saveChangeSetFiles(null, createChangeSetContentZipFile(file1, file2));

        FileDAO fileDAO = new FileDAO(ds.getDB());

        for (File expectedFile : asList(file1, file2)) {
            InputStream inputStream = fileDAO.findOne(expectedFile.getName());
            assertNotNull(inputStream, "Failed to find file in database with id " + expectedFile.getName());
            File actualFile = new File(getBaseDir(), "actualContent");
            actualFile.delete();
            StreamUtil.copy(inputStream, new FileOutputStream(actualFile));
            assertEquals(sha256(actualFile), sha256(expectedFile), "The SHA-256 hash in the database does not " +
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.