Package org.rhq.enterprise.server.plugins.disk

Examples of org.rhq.enterprise.server.plugins.disk.DiskSource


        when(mockRepoFolder.isDirectory()).thenReturn(true);
        when(mockRepoFolder.getName()).thenReturn(repoName);
        when(mockRepoFolder.listFiles()).thenReturn(new File[0]);

        //create object to test and inject required dependencies
        DiskSource objectUnderTest = new DiskSource();

        //run methods under test
        objectUnderTest.initialize(mockConfiguration);
        objectUnderTest.synchronizePackages(repoName, mockPackageSyncReport, mockCollection);

        //verify the results (Assert and Mock Verification)
        verify(mockPackageSyncReport, never()).addUpdatedPackage(any(ContentProviderPackageDetails.class));
        verify(mockPackageSyncReport, never()).addNewPackage(any(ContentProviderPackageDetails.class));
        verify(mockConfiguration, times(2)).get(anyString());
View Full Code Here


        when(mockFile.getName()).thenReturn("fileName");
        when(mockFile.getAbsolutePath()).thenReturn("mock path");

        //create object to test and inject required dependencies
        DiskSource objectUnderTest = new DiskSource();

        //run methods under test
        objectUnderTest.initialize(mockConfiguration);
        objectUnderTest.synchronizePackages(repoName, mockPackageSyncReport, mockCollection);

        //verify the results (Assert and Mock Verification)
        verify(mockPackageSyncReport, never()).addUpdatedPackage(any(ContentProviderPackageDetails.class));
        verify(mockConfiguration, times(2)).get(anyString());
        verifyNew(File.class).withArguments(directoryPath);
View Full Code Here

        when(mockFile.getName()).thenReturn("fileName");
        when(mockFile.getAbsolutePath()).thenReturn("mock path");

        //create object to test and inject required dependencies
        DiskSource objectUnderTest = new DiskSource();

        //run methods under test
        objectUnderTest.initialize(mockConfiguration);
        objectUnderTest.synchronizePackages(repoName, mockPackageSyncReport, mockCollection);

        //verify the results (Assert and Mock Verification)
        verify(mockPackageSyncReport, never()).addUpdatedPackage(any(ContentProviderPackageDetails.class));
        verify(mockConfiguration, times(2)).get(anyString());
        verifyNew(File.class).withArguments(directoryPath);
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.plugins.disk.DiskSource

Copyright © 2018 www.massapicom. 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.