"Fossies" - the Fresh Open Source Software Archive

Member "grails-core-5.2.2/grails-web-url-mappings/src/test/groovy/grails/web/mapping/AbstractUrlMappingsSpec.groovy" (2 Aug 2022, 915 Bytes) of package /linux/www/grails-core-5.2.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Java source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 package grails.web.mapping
    2 
    3 import grails.web.CamelCaseUrlConverter
    4 import grails.web.mapping.LinkGenerator
    5 import grails.web.mapping.LinkGeneratorFactory
    6 import grails.web.mapping.UrlMappings
    7 import grails.web.mapping.UrlMappingsFactory
    8 import org.grails.web.mapping.DefaultLinkGenerator
    9 import org.grails.web.mapping.DefaultUrlMappingEvaluator
   10 import org.grails.web.mapping.DefaultUrlMappingsHolder
   11 import org.grails.web.util.WebUtils
   12 import org.springframework.mock.web.MockServletContext
   13 import spock.lang.Specification
   14 
   15 /**
   16  * @author Graeme Rocher
   17  */
   18 abstract class AbstractUrlMappingsSpec extends Specification{
   19 
   20     def setup() {
   21         WebUtils.clearGrailsWebRequest()
   22     }
   23 
   24     LinkGenerator getLinkGenerator(Closure mappings) {
   25         new LinkGeneratorFactory().create(mappings)
   26     }
   27     UrlMappings getUrlMappingsHolder(Closure mappings) {
   28         new UrlMappingsFactory().create(mappings)
   29     }
   30 }