Remove allure (phase2) (#2483)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -13,13 +13,13 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.qameta.allure.Feature;
|
||||
import io.qameta.allure.Story;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Feature("Unit Tests - Management API")
|
||||
@Story("Serialization")
|
||||
/**
|
||||
* Feature: Unit Tests - Management API<br/>
|
||||
* Story: Serialization
|
||||
*/
|
||||
class AuditFieldSerializationTest {
|
||||
|
||||
@Test
|
||||
|
||||
@@ -15,25 +15,26 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.qameta.allure.Description;
|
||||
import io.qameta.allure.Feature;
|
||||
import io.qameta.allure.Story;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Feature("Unit Tests - Management API")
|
||||
@Story("Paged List Handling")
|
||||
/**
|
||||
* Feature: Unit Tests - Management API<br/>
|
||||
* Story: Paged List Handling
|
||||
*/
|
||||
class PagedListTest {
|
||||
|
||||
@Test
|
||||
@Description("Ensures that a null payload entity throws an exception.")
|
||||
void createListWithNullContentThrowsException() {
|
||||
/**
|
||||
* Ensures that a null payload entity throws an exception.
|
||||
*/
|
||||
@Test void createListWithNullContentThrowsException() {
|
||||
assertThatThrownBy(() -> new PagedList<>(null, 0))
|
||||
.isInstanceOf(NullPointerException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Description("Create list with payload and verify content.")
|
||||
void createListWithContent() {
|
||||
/**
|
||||
* Create list with payload and verify content.
|
||||
*/
|
||||
@Test void createListWithContent() {
|
||||
final long knownTotal = 2;
|
||||
final List<String> knownContentList = new ArrayList<>();
|
||||
knownContentList.add("content1");
|
||||
@@ -42,9 +43,10 @@ class PagedListTest {
|
||||
assertListSize(knownTotal, knownContentList);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Description("Create list with payload and verify size values.")
|
||||
void createListWithSmallerTotalThanContentSizeIsOk() {
|
||||
/**
|
||||
* Create list with payload and verify size values.
|
||||
*/
|
||||
@Test void createListWithSmallerTotalThanContentSizeIsOk() {
|
||||
final long knownTotal = 0;
|
||||
final List<String> knownContentList = new ArrayList<>();
|
||||
knownContentList.add("content1");
|
||||
|
||||
@@ -17,21 +17,23 @@ import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.qameta.allure.Story;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.context.annotation.Description;
|
||||
|
||||
@Story("Retrieve all open action ids")
|
||||
@Description("Tests for the MgmtTargetAssignmentResponseBody")
|
||||
/**
|
||||
* Feature: Tests for the MgmtTargetAssignmentResponseBody<br/>
|
||||
* Story: Retrieve all open action ids
|
||||
*/
|
||||
class MgmtTargetAssignmentResponseBodyTest {
|
||||
|
||||
private static final List<Long> ASSIGNED_ACTIONS = Arrays.asList(4L, 5L, 6L);
|
||||
private static final int ALREADY_ASSIGNED_COUNT = 3;
|
||||
private static final String CONTROLLER_ID = "target";
|
||||
|
||||
@Test
|
||||
@Description("Tests that the ActionIds are serialized correctly in MgmtTargetAssignmentResponseBody")
|
||||
void testActionIdsSerialization() throws IOException {
|
||||
/**
|
||||
* Tests that the ActionIds are serialized correctly in MgmtTargetAssignmentResponseBody
|
||||
*/
|
||||
@Test void testActionIdsSerialization() throws IOException {
|
||||
final MgmtTargetAssignmentResponseBody responseBody = generateResponseBody();
|
||||
final ObjectMapper objectMapper = new ObjectMapper();
|
||||
final String responseBodyAsString = objectMapper.writeValueAsString(responseBody);
|
||||
|
||||
Reference in New Issue
Block a user