Skip to content
Snippets Groups Projects
Commit e20920d5 authored by René Schöne's avatar René Schöne
Browse files

Working on bugfixes for attributes

- cleanup
parent 5a89cd75
No related branches found
No related tags found
1 merge request!32Resolve "Allow collection and circular attributes as endpoint targets"
Pipeline #13820 passed
This commit is part of merge request !32. Comments created here will be created in the context of that merge request.
...@@ -22,7 +22,6 @@ import static org.junit.jupiter.api.Assertions.*; ...@@ -22,7 +22,6 @@ import static org.junit.jupiter.api.Assertions.*;
* @author rschoene - Initial contribution * @author rschoene - Initial contribution
*/ */
@Tag("Incremental") @Tag("Incremental")
@Tag("New")
public class AttributeTest extends AbstractMqttTest { public class AttributeTest extends AbstractMqttTest {
private static final String TOPIC_WILDCARD = "attr/#"; private static final String TOPIC_WILDCARD = "attr/#";
...@@ -180,7 +179,6 @@ public class AttributeTest extends AbstractMqttTest { ...@@ -180,7 +179,6 @@ public class AttributeTest extends AbstractMqttTest {
senderString.setInput("test-01"); senderString.setInput("test-01");
checker.check(); checker.check();
// TODO check checks for (circular and) collection
senderString.addA(new A().setValue("test-02").setInner(new Inner().setInnerValue("inner"))); senderString.addA(new A().setValue("test-02").setInner(new Inner().setInnerValue("inner")));
checker.addToNumberOfValues(2) // collection(2) checker.addToNumberOfValues(2) // collection(2)
.put(CHECK_COLLECTION, "[test-01, test-02]") .put(CHECK_COLLECTION, "[test-01, test-02]")
...@@ -289,7 +287,6 @@ public class AttributeTest extends AbstractMqttTest { ...@@ -289,7 +287,6 @@ public class AttributeTest extends AbstractMqttTest {
private void checkCollection(String name, String expected) { private void checkCollection(String name, String expected) {
if (expected != null) { if (expected != null) {
// TODO probably need to tokenize actual and expected, and compare their elements without order
assertThat(receiverRoot.getFromCollectionWithMapping()).hasSizeGreaterThan(4).endsWith("post"); assertThat(receiverRoot.getFromCollectionWithMapping()).hasSizeGreaterThan(4).endsWith("post");
checkCollectionContent(name, expected, receiverRoot.getFromCollectionNoMapping()); checkCollectionContent(name, expected, receiverRoot.getFromCollectionNoMapping());
checkCollectionContent(name + " mapped", expected, receiverRoot.getFromCollectionWithMapping().substring(0, receiverRoot.getFromCollectionWithMapping().length() - 4)); checkCollectionContent(name + " mapped", expected, receiverRoot.getFromCollectionWithMapping().substring(0, receiverRoot.getFromCollectionWithMapping().length() - 4));
......
package org.jastadd.ragconnect.tests; package org.jastadd.ragconnect.tests;
import indexedSendInc.ast.*; import indexedSendInc.ast.*;
import io.github.artsok.RepeatedIfExceptionsTest;
import org.assertj.core.api.Assertions; import org.assertj.core.api.Assertions;
import org.assertj.core.groups.Tuple; import org.assertj.core.groups.Tuple;
import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import java.io.IOException; import java.io.IOException;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
...@@ -141,8 +141,7 @@ public class IndexedSendTest extends AbstractMqttTest { ...@@ -141,8 +141,7 @@ public class IndexedSendTest extends AbstractMqttTest {
} }
@Tag("mqtt") @Tag("mqtt")
// @RepeatedIfExceptionsTest(repeats = TEST_REPETITIONS) @RepeatedIfExceptionsTest(repeats = TEST_REPETITIONS)
@Test
public void testCommunicateSendInitialValueWithNTAs() throws IOException, InterruptedException { public void testCommunicateSendInitialValueWithNTAs() throws IOException, InterruptedException {
this.writeCurrentValue = true; this.writeCurrentValue = true;
this.connectNTAsInstead = true; this.connectNTAsInstead = true;
...@@ -159,8 +158,7 @@ public class IndexedSendTest extends AbstractMqttTest { ...@@ -159,8 +158,7 @@ public class IndexedSendTest extends AbstractMqttTest {
} }
@Tag("mqtt") @Tag("mqtt")
// @RepeatedIfExceptionsTest(repeats = TEST_REPETITIONS) @RepeatedIfExceptionsTest(repeats = TEST_REPETITIONS)
@Test
public void testCommunicateOnlyUpdatedValueWithNTAs() throws IOException, InterruptedException { public void testCommunicateOnlyUpdatedValueWithNTAs() throws IOException, InterruptedException {
this.writeCurrentValue = false; this.writeCurrentValue = false;
this.connectNTAsInstead = true; this.connectNTAsInstead = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment