File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
google-http-client-protobuf/src
main/java/com/google/api/client/protobuf
test/java/com/google/api/client/protobuf Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 37
37
public class ProtocolBuffers {
38
38
39
39
/** {@code "application/x-protobuf"} content type. */
40
- public static final String CONTENT_TYPE = "application/x-protobuf" ;
40
+ public static final String CONTENT_TYPE ;
41
41
42
42
/** {@code "application/x-protobuffer"} content type. */
43
- public static final String ALT_CONTENT_TYPE = "application/x-protobuffer" ;
43
+ public static final String ALT_CONTENT_TYPE ;
44
+
45
+ static {
46
+ CONTENT_TYPE = "application/x-protobuf" ;
47
+ ALT_CONTENT_TYPE = "application/x-protobuffer" ;
48
+ }
44
49
45
50
/**
46
51
* Parses protocol buffer content from an input stream (closing the input stream) into a protocol
Original file line number Diff line number Diff line change 14
14
15
15
package com .google .api .client .protobuf ;
16
16
17
+ import static org .junit .Assert .assertEquals ;
18
+
17
19
import java .io .ByteArrayInputStream ;
18
- import junit .framework .TestCase ;
20
+ import org .junit .Test ;
21
+ import org .junit .runner .RunWith ;
22
+ import org .junit .runners .JUnit4 ;
19
23
20
24
/**
21
25
* Tests {@link ProtocolBuffers}.
22
26
*
23
27
* @author Yaniv Inbar
24
28
*/
25
- public class ProtocolBuffersTest extends TestCase {
29
+ @ RunWith (JUnit4 .class )
30
+ public class ProtocolBuffersTest {
26
31
32
+ @ Test
27
33
public void testParseAndClose () throws Exception {
28
34
SimpleProto .TestMessage mockResponse =
29
35
SimpleProto .TestMessage .newBuilder ()
You can’t perform that action at this time.
0 commit comments