| /** |
| Example Action feed for Google Order Redirect. |
| **/ |
| |
| package com.example.order_redirect; |
| |
| import static org.junit.Assert.assertEquals; |
| import org.junit.Test; |
| |
| import com.example.order_redirect.ActionFeedExample; |
| import com.google.protobuf.InvalidProtocolBufferException; |
| |
| public class ActionFeedExampleTest { |
| |
| @Test |
| public void testCreateActionFeed() throws InvalidProtocolBufferException { |
| ActionFeedExample actionFeedExample = new ActionFeedExample(); |
| assertEquals(actionFeedExample.createActionFeed(),"{\"data\":[{\"actions\":[{\"food_ordering_info\":{\"service_type\":\"DELIVERY\"}},{\"food_ordering_info\":{\"service_type\":\"TAKEOUT\"}}],\"entity_id\":\"merchant-1\",\"link_id\":\"merchant-1-takeout-delivery-action\",\"url\":\"http://provider.com/merchant-1\"},{\"actions\":[{\"food_ordering_info\":{\"service_type\":\"DELIVERY\"}}],\"entity_id\":\"merchant-2\",\"link_id\":\"merchant-2-delivery-action\",\"url\":\"http://provider.com/merchant-2/delivery\"}]}"); |
| } |
| |
| } |