@@ -822,13 +822,53 @@ public void testSchemaReferences() throws Exception {
822
822
823
823
@ Test
824
824
public void testSchemaReferencesMultipleLevels () throws Exception {
825
- String root = "[\" myavro.BudgetDecreased\" ,\" myavro.BudgetUpdated\" ]" ;
826
-
827
- String ref1 = "{\n " + " \" type\" : \" record\" ,\n " + " \" name\" : \" BudgetDecreased\" ,\n " + " \" namespace\" : \" myavro\" ,\n " + " \" fields\" : [ {\n " + " \" name\" : \" buyerId\" ,\n " + " \" type\" : \" long\" \n " + " }, {\n " + " \" name\" : \" currency\" ,\n " + " \" type\" : {\n " + " \" type\" : \" myavro.currencies.Currency\" " + " }\n " + " }, {\n " + " \" name\" : \" amount\" ,\n " + " \" type\" : \" double\" \n " + " } ]\n " + "}" ;
828
-
829
- String ref2 = "{\n " + " \" type\" : \" record\" ,\n " + " \" name\" : \" BudgetUpdated\" ,\n " + " \" namespace\" : \" myavro\" ,\n " + " \" fields\" : [ {\n " + " \" name\" : \" buyerId\" ,\n " + " \" type\" : \" long\" \n " + " }, {\n " + " \" name\" : \" currency\" ,\n " + " \" type\" : {\n " + " \" type\" : \" myavro.currencies.Currency\" " + " }\n " + " }, {\n " + " \" name\" : \" updatedValue\" ,\n " + " \" type\" : \" double\" \n " + " } ]\n " + "}" ;
830
-
831
- String sharedRef = "{\n " + " \" type\" : \" enum\" ,\n " + " \" name\" : \" Currency\" ,\n " + " \" namespace\" : \" myavro.currencies\" ,\n " + " \" symbols\" : [ \" EUR\" , \" USD\" ]\n " + " }\n " ;
825
+ String root = """
826
+ ["myavro.BudgetDecreased","myavro.BudgetUpdated"]""" ;
827
+
828
+ String ref1 = """
829
+ {
830
+ "type" : "record",
831
+ "name" : "BudgetDecreased",
832
+ "namespace" : "myavro",
833
+ "fields" : [ {
834
+ "name" : "buyerId",
835
+ "type" : "long"
836
+ }, {
837
+ "name" : "currency",
838
+ "type" : {
839
+ "type" : "myavro.currencies.Currency" }
840
+ }, {
841
+ "name" : "amount",
842
+ "type" : "double"
843
+ } ]
844
+ }""" ;
845
+
846
+ String ref2 = """
847
+ {
848
+ "type" : "record",
849
+ "name" : "BudgetUpdated",
850
+ "namespace" : "myavro",
851
+ "fields" : [ {
852
+ "name" : "buyerId",
853
+ "type" : "long"
854
+ }, {
855
+ "name" : "currency",
856
+ "type" : {
857
+ "type" : "myavro.currencies.Currency" }
858
+ }, {
859
+ "name" : "updatedValue",
860
+ "type" : "double"
861
+ } ]
862
+ }""" ;
863
+
864
+ String sharedRef = """
865
+ {
866
+ "type" : "enum",
867
+ "name" : "Currency",
868
+ "namespace" : "myavro.currencies",
869
+ "symbols" : [ "EUR", "USD" ]
870
+ }
871
+ """ ;
832
872
833
873
ConfluentTestUtils .registerAndVerifySchema (confluentClient , new AvroSchema (sharedRef ).canonicalString (), "shared" );
834
874
0 commit comments