<commit_before>package com.tesco.bootcamp.orderreview.adaptor;

import com.tesco.bootcamp.orderreview.representations.*;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by xm39 on 12/01/2017.
 */
@Component
public class DummyOrderSystemAdaptor implements OrderSystemAdaptor {

    public DummyOrderSystemAdaptor() {
    }

    @Override
    public List<CustomerOrder> call(String customerId) {

        // Temporary test data for order display.
        ArrayList<Product> products = new ArrayList<Product>();
        products.add(new Product("Baked Beans","Tinned"));
        products.add(new Product("Petite Pois","Tinned"));
        products.add(new Product("Tomato Soup","Tinned"));

        Customer customer = new Customer(1,new CustomerName("Fred", "Bloggs"));

        OrderDestination orderDestination = new OrderDestination(1,1);

        CustomerOrder customerOrder1 = new CustomerOrder("1",customer, products,orderDestination,"2017-01-01");
        CustomerOrder customerOrder2 = new CustomerOrder("2",customer, products,orderDestination,"2017-01-02");
        CustomerOrder customerOrder3 = new CustomerOrder("3",customer, products,orderDestination,"2017-01-03");
        CustomerOrder customerOrder4 = new CustomerOrder("4",customer, products,orderDestination,"2017-01-04");

        ArrayList<CustomerOrder> customerOrders = new ArrayList<CustomerOrder>();
        customerOrders.add(customerOrder1);
        customerOrders.add(customerOrder2);
        customerOrders.add(customerOrder3);
        customerOrders.add(customerOrder4);

        return customerOrders;
    }
}<commit_msg>Created DummyOrderServiceAdaptor and refactored the CustomerOrder<commit_after>package com.tesco.bootcamp.orderreview.adaptor;

import com.tesco.bootcamp.orderreview.representations.*;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by xm39 on 12/01/2017.
 */
@Component
public class DummyOrderSystemAdaptor implements OrderSystemAdaptor {

    public DummyOrderSystemAdaptor() {
    }

    @Override
    public List<CustomerOrder> call(String customerId) {

        // Temporary test data for order display.
        ArrayList<Product> products = new ArrayList<Product>();
        products.add(new Product("Baked Beans","Tinned"));
        products.add(new Product("Petite Pois","Tinned"));
        products.add(new Product("Tomato Soup","Tinned"));
        products.add(new Product("Spaghetti Hoops","Tinned"));
        products.add(new Product("Tuna Chunks","Tinned"));

        Customer customer = new Customer(1,new CustomerName("Fred", "Bloggs"));

        OrderDestination orderDestination = new OrderDestination(1,1);

        CustomerOrder customerOrder1 = new CustomerOrder("1",customer, products,orderDestination,"2017-01-01");
        CustomerOrder customerOrder2 = new CustomerOrder("2",customer, products,orderDestination,"2017-01-02");
        CustomerOrder customerOrder3 = new CustomerOrder("3",customer, products,orderDestination,"2017-01-03");
        CustomerOrder customerOrder4 = new CustomerOrder("4",customer, products,orderDestination,"2017-01-04");

        ArrayList<CustomerOrder> customerOrders = new ArrayList<CustomerOrder>();
        customerOrders.add(customerOrder1);
        customerOrders.add(customerOrder2);
        customerOrders.add(customerOrder3);
        customerOrders.add(customerOrder4);

        return customerOrders;
    }
}
{'fraction_non_alphanumeric': 0.1145952109464082, 'fraction_numerical': 0.03249714937286203, 'mean_word_length': 4.365443425076452, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1467523', 'n_tokens_mistral': 1004, 'n_tokens_neox': 934, 'n_words': 185}