============LICENSE_START=======================================================
ECOMP Policy Engine - Drools PDP
================================================================================
- Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017, 2019-2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<name>api-active-standby-management</name>
<description>API for Active Standby Management feature</description>
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.onap.policy.drools-pdp</groupId>
with minor changes -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
============LICENSE_START=======================================================
ONAP Policy Engine - Drools PDP
================================================================================
- Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017, 2019-2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<description>Separately loadable module for state management APIe</description>
<properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
<swagger.version>1.5.0</swagger.version>
</properties>
with minor changes -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
============LICENSE_START=======================================================
feature-active-standby-management
================================================================================
- Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
with minor changes -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
============LICENSE_START=======================================================
ONAP Policy Engine - Drools PDP
================================================================================
- Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<name>feature-distributed-locking</name>
<description>Loadable module that provides distributed locking capability</description>
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- </properties>
-
<build>
<plugins>
<plugin>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
+ <artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyLong;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
============LICENSE_START=======================================================
ONAP Policy Engine - Drools PDP
================================================================================
- Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<dependency>
<groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
+ <artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
* ============LICENSE_START=======================================================
* feature-drools-init
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
}
@Test
- public void initTest() {
+ public void testInit() {
FactHandle factHandle = mock(FactHandle.class);
when(kieSession.insert(any())).thenReturn(factHandle);
when(kieSession.getObject(factHandle)).thenReturn(new Object());
* ============LICENSE_START=======================================================
* feature-eelf
* ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
@Test
- public void slf4jLog() {
+ public void testSlf4jLog() {
/* standard slf4j using defaults */
============LICENSE_START=======================================================
ONAP Policy Engine - Drools PDP
================================================================================
- Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<name>feature-healthcheck</name>
<description>Loadable module that performs remote system healthchecks</description>
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- </properties>
-
<build>
<plugins>
<plugin>
with minor changes -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
+ <artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
============LICENSE_START=======================================================
ONAP
================================================================================
- Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<name>feature-lifecycle</name>
<description>Loadable module to support the lifecycle modes</description>
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- </properties>
-
<build>
<plugins>
<plugin>
<dependency>
<groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
+ <artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
</dependency>
}
@Test
- public void start() {
+ public void testStart() {
assertActive();
assertFalse(fsm.start());
assertActive();
}
@Test
- public void stop() {
+ public void testStop() {
assertTrue(fsm.stop());
assertBasicTerminated();
}
@Test
- public void shutdown() {
+ public void testShutdown() {
fsm.shutdown();
assertBasicTerminated();
}
@Test
- public void status() {
+ public void testStatus() {
waitUntil(fsm.getStatusTimerSeconds() + 1, TimeUnit.SECONDS, isStatus(PdpState.ACTIVE));
int preCount = fsm.client.getSink().getRecentEvents().length;
}
@Test
- public void stateChange() throws CoderException {
+ public void testStateChange() throws CoderException {
assertActive();
/* no name and mismatching group info */
}
@Test
- public void update() throws IOException, CoderException {
+ public void testUpdate() throws IOException, CoderException {
// TODO: extract repeated similar assertion blocks into their own helper methods
}
@Test
- public void controller() {
+ public void testController() {
fsm.start(controllerSupport.getController());
assertSame(controllerSupport.getController(),
fsm.getController(new ToscaPolicyTypeIdentifier(ControllerSupport.POLICY_TYPE,
}
@Test
- public void start() {
+ public void testStart() {
assertEquals(0, fsm.client.getSink().getRecentEvents().length);
assertFalse(fsm.start());
assertBasicPassive();
}
@Test
- public void shutdown() throws Exception {
+ public void testShutdown() throws Exception {
simpleStop();
fsm.shutdown();
}
@Test
- public void status() {
+ public void testStatus() {
assertTrue(fsm.client.getSink().isAlive());
assertTrue(fsm.status());
assertSame(0, fsm.client.getSink().getRecentEvents().length);
}
@Test
- public void update() throws IOException, CoderException {
+ public void testUpdate() throws IOException, CoderException {
controllerSupport.getController().getDrools().delete(ToscaPolicy.class);
assertEquals(0, controllerSupport.getController().getDrools().factCount("junits"));
}
@Test
- public void stateChange() throws CoderException, IOException {
+ public void testStateChange() throws CoderException, IOException {
/* no name */
PdpStateChange change = new PdpStateChange();
change.setPdpGroup("A");
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
@Test
- public void constructor() {
+ public void testConstructor() {
assertThatIllegalArgumentException().isThrownBy(() -> new LifecycleStateTerminated(null));
LifecycleState state = new LifecycleStateTerminated(new LifecycleFsm());
}
@Test
- public void stop() {
+ public void testStop() {
assertEquals(PdpState.TERMINATED, fsm.state.state());
assertFalse(fsm.isAlive());
}
@Test
- public void bounce() {
+ public void testBounce() {
assertBasicTerminated();
simpleStart();
simpleStop();
@Test
public void doubleBounce() {
- bounce();
- bounce();
+ testBounce();
+ testBounce();
}
@Test
- public void doubleStartBounce() {
+ public void testDoubleStartBounce() {
simpleStart();
assertFalse(fsm.start());
assertBasicPassive();
}
@Test
- public void shutdown() {
+ public void testShutdown() {
assertBasicTerminated();
fsm.shutdown();
assertBasicTerminated();
}
@Test
- public void status() {
+ public void testStatus() {
assertBasicTerminated();
assertFalse(fsm.status());
assertBasicTerminated();
}
@Test
- public void update() {
+ public void testUpdate() {
PdpUpdate update = new PdpUpdate();
update.setName(NetworkUtil.getHostname());
update.setPdpGroup("A");
}
@Test
- public void stateChange() {
+ public void testStateChange() {
PdpStateChange change = new PdpStateChange();
change.setPdpGroup("A");
change.setPdpSubgroup("a");
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
@Test
- public void fsm() {
+ public void testFsm() {
Response response = HttpClientFactoryInstance.getClientFactory().get("lifecycle").get("fsm");
assertNotNull(HttpClient.getBody(response, String.class));
assertEquals(Status.OK.getStatusCode(), response.getStatus());
-<!--\r
- ============LICENSE_START=======================================================\r
- feature-mdc-filters\r
- ================================================================================\r
- Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.\r
- ================================================================================\r
- Licensed under the Apache License, Version 2.0 (the "License");\r
- you may not use this file except in compliance with the License.\r
- You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
- ============LICENSE_END=========================================================\r
- -->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
- <modelVersion>4.0.0</modelVersion>\r
- <parent>\r
- <artifactId>drools-pdp</artifactId>\r
- <groupId>org.onap.policy.drools-pdp</groupId>\r
- <version>1.6.0-SNAPSHOT</version>\r
- </parent>\r
-\r
- <artifactId>feature-mdc-filters</artifactId>\r
-\r
- <name>feature-mdc-filters</name>\r
- <description>Loadable module that marks key fields in messages through logback mdc.</description>\r
-\r
- <properties>\r
- <maven.compiler.source>1.8</maven.compiler.source>\r
- <maven.compiler.target>1.8</maven.compiler.target>\r
- </properties>\r
-\r
- <build>\r
- <plugins>\r
- <plugin>\r
- <artifactId>maven-assembly-plugin</artifactId>\r
- <executions>\r
- <execution>\r
- <id>zipfile</id>\r
- <goals>\r
- <goal>single</goal>\r
- </goals>\r
- <phase>package</phase>\r
- <configuration>\r
- <attach>true</attach>\r
- <finalName>${project.artifactId}-${project.version}</finalName>\r
- <descriptors>\r
- <descriptor>src/assembly/assemble_zip.xml</descriptor>\r
- </descriptors>\r
- <appendAssemblyId>false</appendAssemblyId>\r
- </configuration>\r
- </execution>\r
- </executions>\r
- </plugin>\r
- <plugin>\r
- <groupId>org.apache.maven.plugins</groupId>\r
- <artifactId>maven-dependency-plugin</artifactId>\r
- <executions>\r
- <execution>\r
- <id>copy-dependencies</id>\r
- <goals>\r
- <goal>copy-dependencies</goal>\r
- </goals>\r
- <phase>prepare-package</phase>\r
- <configuration>\r
- <outputDirectory>${project.build.directory}/assembly/lib</outputDirectory>\r
- <overWriteReleases>false</overWriteReleases>\r
- <overWriteSnapshots>true</overWriteSnapshots>\r
- <overWriteIfNewer>true</overWriteIfNewer>\r
- <useRepositoryLayout>false</useRepositoryLayout>\r
- <addParentPoms>false</addParentPoms>\r
- <copyPom>false</copyPom>\r
- <includeScope>runtime</includeScope>\r
- <excludeTransitive>true</excludeTransitive>\r
- </configuration>\r
- </execution>\r
- </executions>\r
- </plugin>\r
- </plugins>\r
- </build>\r
-\r
- <dependencies>\r
-\r
- <dependency>\r
- <groupId>org.onap.policy.common</groupId>\r
- <artifactId>policy-endpoints</artifactId>\r
- <version>${policy.common.version}</version>\r
- <scope>provided</scope>\r
- </dependency>\r
-\r
- <dependency>\r
- <groupId>org.onap.policy.drools-pdp</groupId>\r
- <artifactId>policy-management</artifactId>\r
- <version>${project.version}</version>\r
- <scope>provided</scope>\r
- </dependency>\r
-\r
- <dependency>\r
- <groupId>org.mockito</groupId>\r
- <artifactId>mockito-core</artifactId>\r
- <version>2.13.0</version>\r
- <scope>test</scope>\r
- </dependency>\r
-\r
- <dependency>\r
- <groupId>org.assertj</groupId>\r
- <artifactId>assertj-core</artifactId>\r
- <scope>test</scope>\r
- </dependency>\r
-\r
- <dependency>\r
- <groupId>junit</groupId>\r
- <artifactId>junit</artifactId>\r
- <scope>test</scope>\r
- </dependency>\r
-\r
- </dependencies>\r
-</project>\r
+<!--
+ ============LICENSE_START=======================================================
+ feature-mdc-filters
+ ================================================================================
+ Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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.
+ ============LICENSE_END=========================================================
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>drools-pdp</artifactId>
+ <groupId>org.onap.policy.drools-pdp</groupId>
+ <version>1.6.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>feature-mdc-filters</artifactId>
+
+ <name>feature-mdc-filters</name>
+ <description>Loadable module that marks key fields in messages through logback mdc.</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>zipfile</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <attach>true</attach>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble_zip.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <phase>prepare-package</phase>
+ <configuration>
+ <outputDirectory>${project.build.directory}/assembly/lib</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <useRepositoryLayout>false</useRepositoryLayout>
+ <addParentPoms>false</addParentPoms>
+ <copyPom>false</copyPom>
+ <includeScope>runtime</includeScope>
+ <excludeTransitive>true</excludeTransitive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>policy-endpoints</artifactId>
+ <version>${policy.common.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onap.policy.drools-pdp</groupId>
+ <artifactId>policy-management</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
* ============LICENSE_START=======================================================
* feature-mdc-filters
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
@Test
- public void modifyFilterRuleMultiPathExceptionTest() {
+ public void testModifyFilterRuleMultiPathException() {
MdcTopicFilter filter = new MdcTopicFilter("abc=$a.value");
assertThatIllegalArgumentException()
.isThrownBy(() -> filter.modifyFilterRule("def", "abc", Arrays.asList("$.b", "$.c")))
}
@Test
- public void findAllNotFoundTest() {
+ public void testFindAllNotFound() {
String message = "{\"requestID\":\"38adde30-cc22-11e8-a8d5-f2801f1b9fd1\",\"entity\":\"controller\","
+ "\"controllers\":[{\"name\":\"test-controller\","
+ "\"drools\":{\"groupId\":\"org.onap.policy.drools.test\","
}
@Test
- public void findNotFoundTest() {
+ public void testFindNotFound() {
String message = "{\"requestID\":\"38adde30-cc22-11e8-a8d5-f2801f1b9fd1\",\"entity\":\"controller\","
+ "\"controllers\":[{\"name\":\"test-controller\","
+ "\"drools\":{\"groupId\":\"org.onap.policy.drools.test\","
============LICENSE_START=======================================================
ONAP Policy Engine - Drools PDP
================================================================================
- Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<description>Endpoints</description>
<properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
<jetty.version>9.3.20.v20170531</jetty.version>
</properties>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>2.13.0</version>
<scope>test</scope>
</dependency>
============LICENSE_START=======================================================
ONAP Policy Engine - Drools PDP
================================================================================
- Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2018, 2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<description>Separately loadable feature module with session persistence code</description>
<properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
+ <artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
* ============LICENSE_START=======================================================
* feature-session-persistence
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018, 2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@Column(name = "updatedDate", nullable = false)
private Date updatedDate;
- public DroolsSessionEntity() {}
+ public DroolsSessionEntity() {
+ }
public DroolsSessionEntity(String sessionName, long sessionId) {
this.sessionName = sessionName;
* ============LICENSE_START=======================================================
* feature-session-persistence
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018, 2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
* ============LICENSE_START=======================================================
* feature-session-persistence
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018, 2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyLong;
-import static org.mockito.Matchers.anyString;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
============LICENSE_START=======================================================
ONAP Policy Engine - Drools PDP
================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017, 2020 AT&T Intellectual Property. All rights reserved.
Modifications Copyright (C) 2019 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
<name>feature-simulators</name>
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- </properties>
-
<dependencies>
<dependency>
<groupId>junit</groupId>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>2.13.0</version>
<scope>test</scope>
</dependency>
<dependency>
============LICENSE_START=======================================================
feature-state-management
================================================================================
- Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
with minor changes -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
* ============LICENSE_START=======================================================
* feature-state-management
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018, 2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
private static Properties properties = null;
- private StateManagementProperties() {}
+ private StateManagementProperties() {
+ }
/**
* Initialize the parameter values from the feature-state-management.properties file values.
============LICENSE_START=======================================================
feature-test-transaction
================================================================================
- Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<description>Separately loadable module which sends test transaction through system</description>
<properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
with minor changes -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
+ <artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
* ============LICENSE_START=======================================================
* feature-test-transaction
* ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyString;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
* ============LICENSE_START=======================================================
* feature-test-transaction
* ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
@Test
- public void registerUnregisterTest() throws InterruptedException {
+ public void testRegisterUnregister() throws InterruptedException {
final Properties controllerProperties = new Properties();
controllerProperties.put(DroolsPropertyConstants.PROPERTY_CONTROLLER_NAME, TEST_CONTROLLER_NAME);
final PolicyController controller =
============LICENSE_START=======================================================
ONAP Policy Engine - Drools PDP
================================================================================
- Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
Modifications Copyright (C) 2019 Bell Canada.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
<dependency>
<groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
+ <artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
</dependency>
with minor changes -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
* ============LICENSE_START=======================================================
* policy-core
* ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @param args standard 'main' arguments, which are currently ignored
* @param configDir the relative directory containing configuration files
*/
- default void globalInit(String[] args, String configDir) {}
+ default void globalInit(String[] args, String configDir) {
+ }
/**
* This method is used to create a 'KieSession' as part of a
*
* @param policySession the new 'PolicySession' instance
*/
- default void newPolicySession(PolicySession policySession) {}
+ default void newPolicySession(PolicySession policySession) {
+ }
/**
* This method is called to select the 'ThreadModel' instance associated
* @param policySession the 'PolicySession' object that wrapped the
* 'KieSession'
*/
- default void disposeKieSession(PolicySession policySession) {}
+ default void disposeKieSession(PolicySession policySession) {
+ }
/**
* This method is called after 'KieSession.destroy()' is called.
* @param policySession the 'PolicySession' object that wrapped the
* 'KieSession'
*/
- default void destroyKieSession(PolicySession policySession) {}
+ default void destroyKieSession(PolicySession policySession) {
+ }
}
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
-import java.nio.file.Path;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.List;
import java.util.stream.Collectors;
+
import lombok.NonNull;
+
import org.apache.commons.io.IOUtils;
import org.drools.compiler.kie.builder.impl.InternalKieModule;
import org.drools.compiler.kproject.models.KieModuleModelImpl;
* Installs a rules artifact in the local maven repository.
*/
public static ReleaseId installArtifact(File kmodule, File pom, String drlKJarPath, @NonNull List<File> drls)
- throws IOException {
+ throws IOException {
KieModuleModel kieModule = KieModuleModelImpl.fromXML(kmodule);
final KieFileSystem kieFileSystem = KieServices.Factory.get().newKieFileSystem();
* Installs a rules artifact in the local maven repository.
*/
public static ReleaseId installArtifact(File kmodule, File pom, String drlKJarPath, File drl)
- throws IOException {
+ throws IOException {
return installArtifact(kmodule, pom, drlKJarPath, Collections.singletonList(drl));
}
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018, 2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
@Override
- public void start() {}
+ public void start() {
+ // do nothing
+ }
};
model.updated();
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
@Test
- public void installArtifact() throws IOException {
+ public void testInstallArtifact() throws IOException {
ReleaseId releaseId =
KieUtils.installArtifact(
Paths.get("src/test/resources/drools-artifact-1.1/src/main/resources/META-INF/kmodule.xml").toFile(),
}
@Test
- public void installArtifactList() throws IOException {
+ public void testInstallArtifactList() throws IOException {
ReleaseId releaseId =
KieUtils.installArtifact(
Paths.get("src/test/resources/drools-artifact-1.1/src/main/resources/META-INF/kmodule.xml").toFile(),
}
@Test
- public void resourceToPackagesTests() {
+ public void testResourceToPackages() {
// Some minimal logging -- it would be nice to verify the 'KieUtils' logger messages
StringBuffer log;
============LICENSE_START=======================================================
ONAP Policy Engine - Drools PDP
================================================================================
- Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
Modifications Copyright (C) 2019 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
with minor changes -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
<dependency>
<groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
+ <artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
</dependency>
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
protected static final String SYSTEM_SYMM_KEY = "engine.symm.key";
/** constructor (hides public default one). */
- private Main() {}
+ private Main() {
+ }
/**
* main.
* ============LICENSE_START=======================================================
* policy-management
* ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public class DroolsControllerFactoryTest {
@Test
- public void buildNullController() {
+ public void testBuildNullController() {
Properties droolsProps = new Properties();
DroolsController droolsController = DroolsControllerConstants.getFactory().build(droolsProps, null, null);
}
@Test
- public void getNullController() {
+ public void testGetNullController() {
DroolsController controller =
DroolsControllerConstants.getFactory().get(DroolsControllerConstants.NO_GROUP_ID,
DroolsControllerConstants.NO_ARTIFACT_ID, DroolsControllerConstants.NO_VERSION);
}
@Test
- public void inventory() {
+ public void testInventory() {
List<DroolsController> controllers = DroolsControllerConstants.getFactory().inventory();
assertNotNull(controllers);
}
@Test
- public void shutdown() {
+ public void testShutdown() {
DroolsControllerFactory droolsFactory = new IndexedDroolsControllerFactory();
droolsFactory.shutdown();
assertTrue(droolsFactory.inventory().isEmpty());
}
@Test
- public void destroy() {
+ public void testDestroy() {
DroolsControllerFactory droolsFactory = new IndexedDroolsControllerFactory();
droolsFactory.destroy();
assertTrue(droolsFactory.inventory().isEmpty());
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
@Test
- public void lock() throws InterruptedException {
+ public void testLock() throws InterruptedException {
DroolsController controller = createDroolsController(30000L);
controller.lock();
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public class NullDroolsControllerTest {
@Test
- public void start() {
+ public void testStart() {
DroolsController controller = new NullDroolsController();
controller.start();
Assert.assertFalse(controller.isAlive());
}
@Test
- public void lock() {
+ public void testLock() {
DroolsController controller = new NullDroolsController();
controller.lock();
Assert.assertFalse(controller.isLocked());
* ============LICENSE_START=======================================================
* policy-management
* ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@Test
- public void putDeleteTest() throws IOException {
+ public void testPutDelete() throws IOException {
HttpDelete httpDelete;
CloseableHttpResponse response;
}
@Test
- public void getTest() throws IOException {
+ public void testGet() throws IOException {
HttpGet httpGet;
CloseableHttpResponse response;
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyLong;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
MockitoAnnotations.initMocks(this);
doAnswer(args -> {
- args.getArgumentAt(0, Runnable.class).run();
+ args.getArgument(0, Runnable.class).run();
return null;
}).when(exsvc).execute(any());
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyLong;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
============LICENSE_START=======================================================
ONAP Policy Engine - Drools PDP
================================================================================
- Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017, 2019-2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
with minor changes -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
* ============LICENSE_START=======================================================
* policy-utils
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018, 2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public class PairTripleTest {
@Test
- public void pairTest() {
+ public void testPair() {
Pair<String, String> pair = new Pair<String, String>("foo", "bar");
assertEquals("foo", pair.first());
}
@Test
- public void tripleTest() {
+ public void testTriple() {
Triple<String, String, String> triple = new Triple<String, String,String>("foo", "bar", "fiz");
assertEquals("foo", triple.first());
* ============LICENSE_START=======================================================
* policy-utils
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018, 2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
@Test
- public void reflectionTest() {
+ public void testReflection() {
try {
* ============LICENSE_START=======================================================
* policy-utils
* ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public class MdcTransactionTest {
@Test
- public void resetSubTransaction() {
+ public void testResetSubTransaction() {
MdcTransaction trans =
MdcTransaction.newTransaction(null, null).resetSubTransaction();
}
@Test
- public void flush() {
+ public void testFlush() {
MdcTransaction trans =
MdcTransaction.newTransaction()
.setRequestId(null)
}
@Test
- public void metric() {
+ public void testMetric() {
MdcTransaction trans =
MdcTransaction.newTransaction(null, null).metric();
}
@Test
- public void transaction() {
+ public void testTransaction() {
MdcTransaction trans =
MdcTransaction.newTransaction(null, null).transaction();
}
@Test
- public void subTransaction() {
+ public void testSubTransaction() {
MdcTransaction trans =
MdcTransaction.newTransaction(null, "partner");
<parent>
<groupId>org.onap.policy.parent</groupId>
<artifactId>integration</artifactId>
- <version>3.1.0</version>
+ <version>3.1.1-SNAPSHOT</version>
<relativePath />
</parent>
<description>The ONAP Policy Engine drools-based PDP Project</description>
<properties>
- <!-- Project common build settings -->
- <project.source.version>1.8</project.source.version>
- <project.target.version>1.8</project.target.version>
-
<!-- Project path properties -->
<nexusproxy>https://nexus.onap.org</nexusproxy>
<sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
<hibernate.commons.annotations.version>5.0.1.Final</hibernate.commons.annotations.version>
<commons.io.version>2.5</commons.io.version>
<xml.apis.version>1.4.01</xml.apis.version>
- <policy.common.version>1.6.1</policy.common.version>
- <policy.models.version>2.2.0</policy.models.version>
+ <policy.common.version>1.6.2-SNAPSHOT</policy.common.version>
+ <policy.models.version>2.2.1-SNAPSHOT</policy.models.version>
</properties>
<modules>
with minor changes -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>