Skip to content

Commit

Permalink
Replace junit4 @test annotation with junit5 annotation (open-telemetr…
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit committed Jul 5, 2024
1 parent 4597d71 commit 47bb31d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import software.amazon.awssdk.services.dynamodb.model.BatchWriteItemRequest;
import software.amazon.awssdk.services.dynamodb.model.BatchWriteItemResponse;
import software.amazon.awssdk.services.dynamodb.model.ConsumedCapacity;
Expand All @@ -25,11 +25,10 @@
import software.amazon.awssdk.services.dynamodb.model.UpdateTableRequest;
import software.amazon.awssdk.services.dynamodb.model.WriteRequest;

public class FieldMapperTest {
class FieldMapperTest {

@Test
public void shouldMapNestedField() {

void shouldMapNestedField() {
// given
AwsSdkRequest awsSdkRequest = UpdateTable;
MethodHandleFactory methodHandleFactory = new MethodHandleFactory();
Expand All @@ -56,8 +55,7 @@ public void shouldMapNestedField() {
}

@Test
public void shouldMapRequestFieldsOnly() {

void shouldMapRequestFieldsOnly() {
// given
AwsSdkRequest awsSdkRequest = BatchWriteItem;
MethodHandleFactory methodHandleFactory = new MethodHandleFactory();
Expand All @@ -76,8 +74,7 @@ public void shouldMapRequestFieldsOnly() {
}

@Test
public void shouldMapResponseFieldsOnly() {

void shouldMapResponseFieldsOnly() {
// given
AwsSdkRequest awsSdkRequest = BatchWriteItem;
MethodHandleFactory methodHandleFactory = new MethodHandleFactory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

class QueryProtocolModelTest extends AbstractQueryProtocolModelTest {
@RegisterExtension
public final LibraryInstrumentationExtension testing = LibraryInstrumentationExtension.create();
private static final LibraryInstrumentationExtension testing =
LibraryInstrumentationExtension.create();

@Override
protected ClientOverrideConfiguration.Builder createClientOverrideConfigurationBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.services.dynamodb.model.ProvisionedThroughput;

public class SerializerTest {
class SerializerTest {

@Test
public void shouldSerializeSimpleString() {
void shouldSerializeSimpleString() {
// given
// when
String serialized = new Serializer().serialize("simpleString");
Expand All @@ -29,7 +29,7 @@ public void shouldSerializeSimpleString() {
}

@Test
public void shouldSerializeSdkPojo() {
void shouldSerializeSdkPojo() {
// given
SdkPojo sdkPojo =
ProvisionedThroughput.builder().readCapacityUnits(1L).writeCapacityUnits(2L).build();
Expand All @@ -40,7 +40,7 @@ public void shouldSerializeSdkPojo() {
}

@Test
public void shouldSerializeCollection() {
void shouldSerializeCollection() {
// given
List<String> collection = Arrays.asList("one", "two", "three");
// when
Expand All @@ -50,7 +50,7 @@ public void shouldSerializeCollection() {
}

@Test
public void shouldSerializeEmptyCollectionAsNull() {
void shouldSerializeEmptyCollectionAsNull() {
// given
List<String> collection = Collections.emptyList();
// when
Expand All @@ -60,7 +60,7 @@ public void shouldSerializeEmptyCollectionAsNull() {
}

@Test
public void shouldSerializeMapAsKeyCollection() {
void shouldSerializeMapAsKeyCollection() {
// given
Map<String, Object> map = new HashMap<>();
map.put("uno", 1L);
Expand Down

0 comments on commit 47bb31d

Please sign in to comment.