Clover icon

sunshower-base

  1. Project Clover database Fri Apr 6 2018 03:41:27 UTC
  2. Package io.sunshower.test.ws

File RESTConfigCustomizer.java

 

Coverage histogram

../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
3
2
1
22
17
2
0.67
1.5
2
1

Classes

Class Line # Actions
RESTConfigCustomizer 8 3 2
1.0100%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package io.sunshower.test.ws;
2   
3    import org.springframework.context.ConfigurableApplicationContext;
4    import org.springframework.context.support.GenericApplicationContext;
5    import org.springframework.test.context.ContextCustomizer;
6    import org.springframework.test.context.MergedContextConfiguration;
7   
 
8    class RESTConfigCustomizer implements ContextCustomizer {
9   
10    private final EnableJAXRS config;
11   
 
12  1 toggle public RESTConfigCustomizer(EnableJAXRS config) {
13  1 this.config = config;
14    }
15   
 
16  1 toggle @Override
17    public void customizeContext(
18    ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) {
19  1 GenericApplicationContext ctx = (GenericApplicationContext) context;
20  1 ctx.getBeanFactory().registerSingleton("SpringServerConfiguration" + config.hashCode(), config);
21    }
22    }