/*
 * Copyright (c) 2016 Open Baton (http://www.openbaton.org)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package org.openbaton.nfvo.core.test;

import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openbaton.nfvo.main.Application;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;

/** Created by lto on 20/04/15. */
@RunWith(SpringJUnit4ClassRunner.class)
@TestExecutionListeners({DependencyInjectionTestExecutionListener.class})
@ContextConfiguration(classes = {Application.class})
@TestPropertySource(properties = {"timezone = GMT", "port: 4242"})
public class IntegrationClassSuiteTest {

  @Autowired ConfigurableApplicationContext context;
  private Logger log = LoggerFactory.getLogger(this.getClass());

  @Test
  public void method1() {
    log.info("Here the context");
    for (String s : context.getBeanDefinitionNames()) {
      log.info(s);
    }
  }

  @After
  public void shutdown() {
    context.close();
  }
}

/*
 * Copyright (c) 2016 Open Baton (http://www.openbaton.org)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package org.openbaton.nfvo.core.test;

import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openbaton.nfvo.main.Application;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;

/** Created by lto on 20/04/15. */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {Application.class})
@TestExecutionListeners({DependencyInjectionTestExecutionListener.class})
@TestPropertySource(properties = {"timezone = GMT", "port: 4242"})
public class IntegrationClassSuiteTest {

  @Autowired ConfigurableApplicationContext context;
  private Logger log = LoggerFactory.getLogger(this.getClass());

  @Test
  public void method1() {
    log.info("Here the context");
    for (String s : context.getBeanDefinitionNames()) {
      log.info(s);
    }
  }

  @After
  public void shutdown() {
    context.close();
  }
}

fix test with correct dependencies