Skip to content

Commit

Permalink
test(extensions): verify fields are injected into superclass
Browse files Browse the repository at this point in the history
The extensions should inject the ZeebeClient and the ZeebeTestEngine into the fields available with this type. This test will verify that this happens for both the embedded engine and the testcontainers engine.
  • Loading branch information
remcowesterhoud committed Dec 14, 2022
1 parent 9badb55 commit db97f19
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright © 2021 camunda services GmbH (info@camunda.com)
*
* 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 io.camunda.zeebe.process.test.qa.abstracts.injection;

import static org.assertj.core.api.Assertions.assertThat;

import io.camunda.zeebe.client.ZeebeClient;
import io.camunda.zeebe.process.test.api.ZeebeTestEngine;
import org.junit.jupiter.api.Test;

public abstract class AbstractInheritanceInjectionTest {
protected ZeebeClient client;
protected ZeebeTestEngine engine;

@Test
void testFieldsAreInjectedSuccessfully() {
assertThat(client).isNotNull();
assertThat(engine).isNotNull();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright © 2021 camunda services GmbH (info@camunda.com)
*
* 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 io.camunda.zeebe.process.test.qa.embedded.injection;

import io.camunda.zeebe.process.test.extension.ZeebeProcessTest;
import io.camunda.zeebe.process.test.qa.abstracts.injection.AbstractInheritanceInjectionTest;

@ZeebeProcessTest
class InheritanceInjectionTest extends AbstractInheritanceInjectionTest {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright © 2021 camunda services GmbH (info@camunda.com)
*
* 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 io.camunda.zeebe.process.test.qa.testcontainer.injection;

import io.camunda.zeebe.process.test.extension.testcontainer.ZeebeProcessTest;
import io.camunda.zeebe.process.test.qa.abstracts.injection.AbstractInheritanceInjectionTest;

@ZeebeProcessTest
class InheritanceInjectionTest extends AbstractInheritanceInjectionTest {}

0 comments on commit db97f19

Please sign in to comment.