0
如何瓶坯单元测试这个功能单元测试的Grails控制器
private void secondaryRepError(def secRepCmd) {
def repProfile = springSecurityService?.currentUser?.representativeProfile
def productTypes = representativeManagementService.getAssignedProductTypes(repProfile)
def facilities = representativeManagementService.getAssignedFacilities(repProfile)
def facilityType = representativeManagementService.getFacilityType()
def listOfRetail = representativeManagementService.listOfFacilities(facilities?.toList(), facilityType?.retail)
def listOfLpg = representativeManagementService.listOfFacilities(facilities?.toList(), facilityType?.lpg)
def listOfPipeline = representativeManagementService.listOfFacilities(facilities?.toList(), facilityType?.pipeline)
def listOfRelated = representativeManagementService.listOfFacilities(facilities?.toList(), facilityType?.related)
render view:'addSecondaryRep', model: [secondaryRepInstance: secRepCmd, appType: ApplicationType.getAll(), productTypes: productTypes, facilities: facilities, retailFacility: facilityType?.retail, lpgFacility: facilityType?.lpg, pipelineFacility: facilityType?.pipeline, facFacility: facilityType?.related, listOfRetail: listOfRetail, listOfLpg: listOfLpg, listOfPipeline: listOfPipeline, listOfRelated:listOfRelated]
}