public static void Main(string[] args)
    {
        var path          = args[0];
        var mileageClaims = ReadMileageClaims(path);

        var job = new ShoutyReportProcessor(mileageClaims);

        WriteEcoStatReport(job.Process());
    }
예제 #2
0
    public static void Main(string[] args)
    {
        var path = args[0];

        Console.WriteLine("Processing " + path);
        var mileageClaims = ReadMileageClaims(path);
        var statsService  = CreateStatsService();

        var job = new ShoutyReportProcessor(mileageClaims, statsService);

        WriteEcoStatsReport(job.Process());
    }
    public void single_sales_person()
    {
        // Create FakeStatsService
        CreateCustomerRevenue();
        var service = CreateFakeStatsService(customerRevenues);

        // Create claims
        CreateMileageClaim(customerRevenues[0].ID);

        // Create ShoutyReportProcessor
        var processor = new ShoutyReportProcessor(claims, service);

        // Call process()
        var stats = processor.Process();

        // Assert contents
        Assert.AreEqual(1, stats.Count);
        AssertExpectedRevenue(claims[0], customerRevenues[0], stats[0]);
    }