content: package com.alibaba.boot.velocity.autoconfigure.condition;
  
  import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
  import org.springframework.beans.factory.support.BeanDefinitionRegistry;
  import org.springframework.context.annotation.ConditionContext;
  import org.springframework.core.env.Environment;
  import org.springframework.core.io.ResourceLoader;
  
  /**
   * Mock {@link ConditionContext}
   *
   * @author <a href="mailto:taogu.mxx@alibaba-inc.com">taogu.mxx</a> (Office)
   * @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
   * @see ConditionContext
   * @since 2017.02.04
   */
  public class MockConditionContext implements ConditionContext {
  
      private BeanDefinitionRegistry registry;
  
      private ConfigurableListableBeanFactory beanFactory;
  
      private Environment environment;
  
      private ResourceLoader resourceLoader;
  
      private ClassLoader classLoader;
  
      @Override
      public BeanDefinitionRegistry getRegistry() {
          return registry;
      }
  
      public void setRegistry(BeanDefinitionRegistry registry) {
          this.registry = registry;
      }
  
      @Override
      public ConfigurableListableBeanFactory getBeanFactory() {
          return beanFactory;
      }
  
      public void setBeanFactory(ConfigurableListableBeanFactory beanFactory) {
          this.beanFactory = beanFactory;
      }
  
      @Override
      public Environment getEnvironment() {
          return environment;
      }
  
      public void setEnvironment(Environment environment) {
          this.environment = environment;
      }
  
      @Override
      public ResourceLoader getResourceLoader() {
          return resourceLoader;
      }
  
      public void setResourceLoader(ResourceLoader resourceLoader) {
          this.resourceLoader = resourceLoader;
      }
  
      @Override
      public ClassLoader getClassLoader() {
          return classLoader;
      }
  
      public void setClassLoader(ClassLoader classLoader) {
          this.classLoader = classLoader;
      }
  }
  