Class OfficeLoaderUtil


  • public class OfficeLoaderUtil
    extends java.lang.Object
    Utility class for testing an OfficeSource.
    Author:
    Daniel Sagenschneider
    • Method Detail

      • getClassPathLocation

        public static java.lang.String getClassPathLocation​(java.lang.Class<?> offsetClass,
                                                            java.lang.String resourceName)
        Convenience method to obtain the class path location.
        Parameters:
        offsetClass - Class indicating the package that the resource is within. Typically this will be the TestCase instance.
        resourceName - Name of the resource.
        Returns:
        Class path location of the resource.
      • validateOffice

        public static <O extends OfficeSourceOfficeType validateOffice​(OfficeArchitect architect,
                                                                         java.lang.Class<O> officeSourceClass,
                                                                         java.lang.Class<?> offsetClass,
                                                                         java.lang.String resourceName,
                                                                         java.lang.String... propertyNameValuePairs)
        Convenience method to validate the OfficeType via an offset object to locate the Office.
        Type Parameters:
        O - OfficeSource type.
        Parameters:
        architect - OfficeArchitect containing the expected OfficeType.
        officeSourceClass - OfficeSource class.
        offsetClass - Class indicating the package that the resource is within. Typically this will be the TestCase instance.
        resourceName - Name of the resource for the Office location.
        propertyNameValuePairs - Property name/value listings.
        Returns:
        OfficeType.