Open Kilda Java Documentation
MonkeySuitePrepareTest.java
Go to the documentation of this file.
1 /* Copyright 2018 Telstra Open Source
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package org.openkilda.atdd.staging.tests.monkeysuite.prepare;
17 
18 import static org.mockito.ArgumentMatchers.any;
19 import static org.mockito.Mockito.times;
20 import static org.mockito.Mockito.verify;
21 
25 
26 import cucumber.api.CucumberOptions;
27 import cucumber.api.java.After;
28 import org.junit.runner.RunWith;
29 import org.springframework.beans.factory.annotation.Autowired;
30 import org.springframework.test.context.ActiveProfiles;
31 
32 @RunWith(CucumberWithSpringProfile.class)
33 @CucumberOptions(features = {"classpath:features/monkey_suite.feature"},
34  glue = {"org.openkilda.atdd.staging.tests.monkeysuite.prepare", "org.openkilda.atdd.staging.steps"},
35  tags = {"@Prepare"},
36  plugin = {"json:target/cucumber-reports/monkey_suite_prepare_report.json"})
37 @ActiveProfiles("mock")
38 public class MonkeySuitePrepareTest {
39 
40  public static class MonkeySuitePrepareHook {
41 
42  @Autowired
43  private NorthboundService northboundService;
44 
45  @After
46  public void assertsAndVerifyMocks() throws OperationalException {
47  verify(northboundService, times(3)).addFlow(any());
48  }
49  }
50 }