Skip to content

Commit 0074a35

Browse files
committed
Renamed "Feign" to "OpenFeign"
1 parent 2fe7b15 commit 0074a35

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

src/main/java/com/mastercard/developer/interceptors/FeignFieldLevelEncryptionDecoder.java renamed to src/main/java/com/mastercard/developer/interceptors/OpenFeignFieldLevelEncryptionDecoder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
/**
1919
* A Feign decoder for decrypting parts of HTTP payloads.
2020
*/
21-
public class FeignFieldLevelEncryptionDecoder implements Decoder {
21+
public class OpenFeignFieldLevelEncryptionDecoder implements Decoder {
2222

2323
private final FieldLevelEncryptionConfig config;
2424
private final Decoder delegate;
2525

26-
public FeignFieldLevelEncryptionDecoder(FieldLevelEncryptionConfig config, Decoder delegate) {
26+
public OpenFeignFieldLevelEncryptionDecoder(FieldLevelEncryptionConfig config, Decoder delegate) {
2727
this.config = config;
2828
this.delegate = delegate;
2929
}

src/main/java/com/mastercard/developer/interceptors/FeignFieldLevelEncryptionEncoder.java renamed to src/main/java/com/mastercard/developer/interceptors/OpenFeignFieldLevelEncryptionEncoder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
/**
1717
* A Feign encoder for encrypting parts of HTTP payloads.
1818
*/
19-
public class FeignFieldLevelEncryptionEncoder implements Encoder {
19+
public class OpenFeignFieldLevelEncryptionEncoder implements Encoder {
2020

2121
private final FieldLevelEncryptionConfig config;
2222
private final Encoder delegate;
2323

24-
public FeignFieldLevelEncryptionEncoder(FieldLevelEncryptionConfig config, Encoder delegate) {
24+
public OpenFeignFieldLevelEncryptionEncoder(FieldLevelEncryptionConfig config, Encoder delegate) {
2525
this.config = config;
2626
this.delegate = delegate;
2727
}

src/test/java/com/mastercard/developer/interceptor/FeignFieldLevelEncryptionDecoderTest.java renamed to src/test/java/com/mastercard/developer/interceptor/OpenFeignFieldLevelEncryptionDecoderTest.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
import com.mastercard.developer.encryption.EncryptionException;
44
import com.mastercard.developer.encryption.FieldLevelEncryptionConfig;
5-
import com.mastercard.developer.interceptors.FeignFieldLevelEncryptionDecoder;
5+
import com.mastercard.developer.interceptors.OpenFeignFieldLevelEncryptionDecoder;
66
import feign.Response;
77
import feign.Util;
88
import feign.codec.DecodeException;
99
import feign.codec.Decoder;
10-
import org.junit.Assert;
1110
import org.junit.Rule;
1211
import org.junit.Test;
1312
import org.junit.rules.ExpectedException;
@@ -27,7 +26,7 @@
2726
import static org.mockito.ArgumentMatchers.any;
2827
import static org.mockito.Mockito.*;
2928

30-
public class FeignFieldLevelEncryptionDecoderTest {
29+
public class OpenFeignFieldLevelEncryptionDecoderTest {
3130

3231
@Rule
3332
public ExpectedException expectedException = ExpectedException.none();
@@ -62,7 +61,7 @@ public void testDecode_ShouldDecryptResponsePayloadAndUpdateContentLengthHeader(
6261
Decoder delegate = mock(Decoder.class);
6362

6463
// WHEN
65-
FeignFieldLevelEncryptionDecoder instanceUnderTest = new FeignFieldLevelEncryptionDecoder(config, delegate);
64+
OpenFeignFieldLevelEncryptionDecoder instanceUnderTest = new OpenFeignFieldLevelEncryptionDecoder(config, delegate);
6665
instanceUnderTest.decode(response, type);
6766

6867
// THEN
@@ -85,7 +84,7 @@ public void testDecode_ShouldDoNothing_WhenNoPayload() throws Exception {
8584
when(response.body()).thenReturn(null);
8685

8786
// WHEN
88-
FeignFieldLevelEncryptionDecoder instanceUnderTest = new FeignFieldLevelEncryptionDecoder(config, delegate);
87+
OpenFeignFieldLevelEncryptionDecoder instanceUnderTest = new OpenFeignFieldLevelEncryptionDecoder(config, delegate);
8988
instanceUnderTest.decode(response, type);
9089

9190
// THEN
@@ -105,7 +104,7 @@ public void testDecode_ShouldDoNothing_WhenEmptyPayload() throws Exception {
105104
Decoder delegate = mock(Decoder.class);
106105

107106
// WHEN
108-
FeignFieldLevelEncryptionDecoder instanceUnderTest = new FeignFieldLevelEncryptionDecoder(config, delegate);
107+
OpenFeignFieldLevelEncryptionDecoder instanceUnderTest = new OpenFeignFieldLevelEncryptionDecoder(config, delegate);
109108
instanceUnderTest.decode(response, type);
110109

111110
// THEN
@@ -139,7 +138,7 @@ public void testDecode_ShouldThrowDecodeException_WhenDecryptionFails() throws E
139138
expectedException.expectCause(isA(EncryptionException.class));
140139

141140
// WHEN
142-
FeignFieldLevelEncryptionDecoder instanceUnderTest = new FeignFieldLevelEncryptionDecoder(config, delegate);
141+
OpenFeignFieldLevelEncryptionDecoder instanceUnderTest = new OpenFeignFieldLevelEncryptionDecoder(config, delegate);
143142
instanceUnderTest.decode(response, type);
144143
}
145144

@@ -180,7 +179,7 @@ public void testDecode_ShouldDecryptResponsePayloadAndRemoveEncryptionHttpHeader
180179
Decoder delegate = mock(Decoder.class);
181180

182181
// WHEN
183-
FeignFieldLevelEncryptionDecoder instanceUnderTest = new FeignFieldLevelEncryptionDecoder(config, delegate);
182+
OpenFeignFieldLevelEncryptionDecoder instanceUnderTest = new OpenFeignFieldLevelEncryptionDecoder(config, delegate);
184183
instanceUnderTest.decode(response, type);
185184

186185
// THEN

src/test/java/com/mastercard/developer/interceptor/FeignFieldLevelEncryptionEncoderTest.java renamed to src/test/java/com/mastercard/developer/interceptor/OpenFeignFieldLevelEncryptionEncoderTest.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
import com.mastercard.developer.encryption.EncryptionException;
44
import com.mastercard.developer.encryption.FieldLevelEncryptionConfig;
5-
import com.mastercard.developer.interceptors.FeignFieldLevelEncryptionEncoder;
5+
import com.mastercard.developer.interceptors.OpenFeignFieldLevelEncryptionEncoder;
66
import com.mastercard.developer.test.TestUtils;
77
import feign.RequestTemplate;
88
import feign.codec.EncodeException;
99
import feign.codec.Encoder;
10-
import org.junit.Assert;
1110
import org.junit.Rule;
1211
import org.junit.Test;
1312
import org.junit.rules.ExpectedException;
@@ -20,7 +19,7 @@
2019
import static org.junit.Assert.*;
2120
import static org.mockito.Mockito.*;
2221

23-
public class FeignFieldLevelEncryptionEncoderTest {
22+
public class OpenFeignFieldLevelEncryptionEncoderTest {
2423

2524
@Rule
2625
public ExpectedException expectedException = ExpectedException.none();
@@ -39,7 +38,7 @@ public void testEncode_ShouldEncryptRequestPayloadAndUpdateContentLengthHeader()
3938
when(request.body()).thenReturn("{\"foo\":\"bar\"}".getBytes());
4039

4140
// WHEN
42-
FeignFieldLevelEncryptionEncoder instanceUnderTest = new FeignFieldLevelEncryptionEncoder(config, delegate);
41+
OpenFeignFieldLevelEncryptionEncoder instanceUnderTest = new OpenFeignFieldLevelEncryptionEncoder(config, delegate);
4342
instanceUnderTest.encode(object, type, request);
4443

4544
// THEN
@@ -67,7 +66,7 @@ public void testEncode_ShouldDoNothing_WhenNoPayload() throws Exception {
6766
when(request.body()).thenReturn(null);
6867

6968
// WHEN
70-
FeignFieldLevelEncryptionEncoder instanceUnderTest = new FeignFieldLevelEncryptionEncoder(config, delegate);
69+
OpenFeignFieldLevelEncryptionEncoder instanceUnderTest = new OpenFeignFieldLevelEncryptionEncoder(config, delegate);
7170
instanceUnderTest.encode(object, type, request);
7271

7372
// THEN
@@ -89,7 +88,7 @@ public void testEncode_ShouldDoNothing_WhenEmptyPayload() throws Exception {
8988
when(request.body()).thenReturn("".getBytes());
9089

9190
// WHEN
92-
FeignFieldLevelEncryptionEncoder instanceUnderTest = new FeignFieldLevelEncryptionEncoder(config, delegate);
91+
OpenFeignFieldLevelEncryptionEncoder instanceUnderTest = new OpenFeignFieldLevelEncryptionEncoder(config, delegate);
9392
instanceUnderTest.encode(object, type, request);
9493

9594
// THEN
@@ -117,7 +116,7 @@ public void testEncode_ShouldThrowEncodeException_WhenEncryptionFails() throws E
117116
expectedException.expectCause(isA(EncryptionException.class));
118117

119118
// WHEN
120-
FeignFieldLevelEncryptionEncoder instanceUnderTest = new FeignFieldLevelEncryptionEncoder(config, delegate);
119+
OpenFeignFieldLevelEncryptionEncoder instanceUnderTest = new OpenFeignFieldLevelEncryptionEncoder(config, delegate);
121120
instanceUnderTest.encode(object, type, request);
122121
}
123122

@@ -140,7 +139,7 @@ public void testEncode_ShouldEncryptRequestPayloadAndAddEncryptionHttpHeaders_Wh
140139
when(request.body()).thenReturn("{\"foo\":\"bar\"}".getBytes());
141140

142141
// WHEN
143-
FeignFieldLevelEncryptionEncoder instanceUnderTest = new FeignFieldLevelEncryptionEncoder(config, delegate);
142+
OpenFeignFieldLevelEncryptionEncoder instanceUnderTest = new OpenFeignFieldLevelEncryptionEncoder(config, delegate);
144143
instanceUnderTest.encode(object, type, request);
145144

146145
// THEN

0 commit comments

Comments
 (0)