public void PayInvoice_100000_Elements()
    {
        Stopwatch st = new Stopwatch();

        List <Invoice> invoices = this.inputGenerator.GenerateInvoices(100000);


        foreach (var inv in invoices)
        {
            agency.Create(inv);
        }


        var mostOccurrences = this.inputGenerator.MostOccur(invoices, x => x.DueDate);

        var stopwach = new Stopwatch();

        stopwach.Start();
        this.agency.PayInvoice(mostOccurrences.Key);
        stopwach.Stop();

        var elapsed = stopwach.ElapsedMilliseconds;

        Assert.IsTrue(elapsed <= 3);
    }
    public void ThrowInvoice_100000_Elements()
    {
        List <Invoice> invoices = this.inputGenerator.GenerateInvoices(100000);

        foreach (var inv in invoices)
        {
            agency.Create(inv);
        }

        var stopwach = new Stopwatch();

        stopwach.Start();
        foreach (var inv in invoices)
        {
            this.agency.ThrowInvoice(inv.SerialNumber);
        }
        stopwach.Stop();

        var elapsed = stopwach.ElapsedMilliseconds;

        Assert.IsTrue(elapsed <= 90);
    }
    public void ThrowPayed_10000_elements()
    {
        List <Invoice> invoices = this.inputGenerator.GenerateInvoices(10000);

        foreach (var inv in invoices)
        {
            agency.Create(inv);
        }

        var mostOccurrences = this.inputGenerator.MostOccur(invoices, x => x.DueDate);

        this.agency.PayInvoice(mostOccurrences.Key);

        var watch = new Stopwatch();

        watch.Start();
        this.agency.ThrowPayed();
        watch.Stop();

        long elapsedTime = watch.ElapsedMilliseconds;

        Assert.IsTrue(elapsedTime <= 3);
    }