* ONAP
* ================================================================================
* Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.drools.pooling.message;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
-import org.junit.Test;
+import lombok.Getter;
+import lombok.Setter;
+import org.junit.jupiter.api.Test;
/**
* Superclass used to test subclasses of {@link MessageWithAssignments}.
*
* @param <T> type of {@link MessageWithAssignments} subclass that this tests
*/
+@Setter
+@Getter
public abstract class SupportMessageWithAssignmentsTester<T extends MessageWithAssignments>
extends SupportBasicMessageTester<T> {
// values set by makeValidMessage()
super(subclazz);
}
- /**
- * Indicates whether or not {@code null} assignments should be used for the
- * remaining tests.
- *
- * @param nullAssignments {@code true} to use {@code null} assignments,
- * {@code false} otherwise
- */
- public void setNullAssignments(boolean nullAssignments) {
- this.nullAssignments = nullAssignments;
- }
-
- public boolean isNullAssignments() {
- return nullAssignments;
- }
-
@Test
- public void testCheckValidity_InvalidFields() throws Exception {
+ public void testCheckValidity_InvalidFields() {
// null source (i.e., superclass field)
expectCheckValidityFailure(msg -> msg.setSource(null));