|
| 1 | +// Copyright (c) 2024 Broadcom. All Rights Reserved. |
| 2 | +// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. |
| 3 | +// |
| 4 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +// you may not use this file except in compliance with the License. |
| 6 | +// You may obtain a copy of the License at |
| 7 | +// |
| 8 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +// |
| 10 | +// Unless required by applicable law or agreed to in writing, software |
| 11 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +// See the License for the specific language governing permissions and |
| 14 | +// limitations under the License. |
| 15 | +// |
| 16 | +// If you have any questions regarding licensing, please contact us at |
| 17 | + |
| 18 | +package com.rabbitmq.client.amqp; |
| 19 | + |
| 20 | +import org.junit.jupiter.api.extension.AfterEachCallback; |
| 21 | +import org.junit.jupiter.api.extension.BeforeEachCallback; |
| 22 | +import org.junit.jupiter.api.extension.ExtensionContext; |
| 23 | +import org.slf4j.Logger; |
| 24 | +import org.slf4j.LoggerFactory; |
| 25 | + |
| 26 | +public class AmqpClientTestExtension implements BeforeEachCallback, AfterEachCallback { |
| 27 | + |
| 28 | + private static final Logger LOGGER = LoggerFactory.getLogger(AmqpClientTestExtension.class); |
| 29 | + |
| 30 | + @Override |
| 31 | + public void beforeEach(ExtensionContext context) { |
| 32 | + LOGGER.info( |
| 33 | + "Starting test: {}.{}", |
| 34 | + context.getTestClass().get().getSimpleName(), |
| 35 | + context.getTestMethod().get().getName()); |
| 36 | + } |
| 37 | + |
| 38 | + @Override |
| 39 | + public void afterEach(ExtensionContext context) { |
| 40 | + LOGGER.info( |
| 41 | + "Test finished: {}.{}", |
| 42 | + context.getTestClass().get().getSimpleName(), |
| 43 | + context.getTestMethod().get().getName()); |
| 44 | + } |
| 45 | +} |
0 commit comments