pandaapo commented on PR #4340:
URL: https://github.com/apache/eventmesh/pull/4340#issuecomment-1669305790

   
   
   
   > @pandaapo For example:
   > 
   > ```java
   >     @Test
   >     public void testBuilder() {
   >         String cloudEventId = "event123"; // these strings should be 
substituted
   >         String eventType = "eventType";
   >         String cloudEventName = "eventName";
   >         String cloudEventSource = "eventSource";
   >         String dataContentType = "contentType";
   >         byte[] body = "testBody".getBytes();
   > 
   >         WebhookProtocolTransportObject webhookProtocolTransportObject = 
WebhookProtocolTransportObject.builder()
   >                 .cloudEventId(cloudEventId)
   >                 .eventType(eventType)
   >                 .cloudEventName(cloudEventName)
   >                 .cloudEventSource(cloudEventSource)
   >                 .dataContentType(dataContentType)
   >                 .body(body)
   >                 .build();
   > 
   >         assertEquals(cloudEventId, 
webhookProtocolTransportObject.getCloudEventId());
   >         assertEquals(eventType, 
webhookProtocolTransportObject.getEventType());
   >         assertEquals(cloudEventName, 
webhookProtocolTransportObject.getCloudEventName());
   >         assertEquals(cloudEventSource, 
webhookProtocolTransportObject.getCloudEventSource());
   >         assertEquals(dataContentType, 
webhookProtocolTransportObject.getDataContentType());
   >         assertArrayEquals(body, webhookProtocolTransportObject.getBody());
   >     }
   > ```
   > 
   
   It is still a self-verification case.
   
   > or assert WebhookProtocolTransportObject:
   > 
   > ```java
   >     @Test
   >     public void testBuilder() {
   >         String cloudEventId = "event123";
   >         String eventType = "eventType";
   >         String cloudEventName = "eventName";
   >         String cloudEventSource = "eventSource";
   >         String dataContentType = "contentType";
   >         byte[] body = "testBody".getBytes();
   > 
   >         WebhookProtocolTransportObject instance1 = new 
WebhookProtocolTransportObject();
   >         instance1.setCloudEventId(cloudEventId);
   >         instance1.setEventType(eventType);
   >         instance1.setCloudEventName(cloudEventName);
   >         instance1.setCloudEventSource(cloudEventSource);
   >         instance1.setDataContentType(dataContentType);
   >         instance1.setBody(body);
   > 
   >         WebhookProtocolTransportObject instance2 = 
WebhookProtocolTransportObject.builder()
   >                 .cloudEventId(cloudEventId)
   >                 .eventType(eventType)
   >                 .cloudEventName(cloudEventName)
   >                 .cloudEventSource(cloudEventSource)
   >                 .dataContentType(dataContentType)
   >                 .body(body)
   >                 .build();
   > 
   >         assertEquals(instance1, instance2);
   >     }
   > ```
   
   I think it is unnecessary to verify the functionality of `lombok` in such a 
way in `evntmesh`. It should belong to `lombok`'s work.
   
   My opinion remains the same: 
[fdce71e](https://github.com/apache/eventmesh/pull/4340/commits/fdce71e06a87f3387cbbde920e59f092be67843d)
 looks good to me.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to