summaryrefslogtreecommitdiff
path: root/src/test/WellSpecs.cs
blob: c6a8a7bfad1f30a2c3a7e117d570a5edb7438c21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
namespace test
{
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using Machine.Specifications;
  using domain;

  public class WellSpecs
  {
    public class when_estimating_production
    {
      It should_be_able_to_tell_the_estimated_total_production_for_any_month= () =>
      {
        var parkland100Percent = new Oppurtunity();
        parkland100Percent.WorkingInterest(100m.Percent());
        var declineCurve = new DeclineCurve();
        declineCurve.Composition<Gas>(100m.Percent());
        declineCurve.Add(0, 100.BOED());
        parkland100Percent.DeclinesUsing(declineCurve);

        var schedule = new DrillSchedule();
        var jan2013 = new Month(2013, 01);
        schedule.Include(parkland100Percent.BringOnlineOn(jan2013));
        schedule.EstimatedGrossProductionFor<All>(jan2013).ShouldEqual(100.BOED());
        schedule.EstimatedGrossProductionFor<Gas>(jan2013).ShouldEqual(100.BOED());
        schedule.EstimatedGrossProductionFor<Oil>(jan2013).ShouldEqual(0.BOED());
        schedule.EstimatedGrossProductionFor<NGL>(jan2013).ShouldEqual(0.BOED());
        schedule.EstimatedGrossProductionFor<Condensate>(jan2013).ShouldEqual(0.BOED());
      };

      It should_be_able_to_tell_the_estimated_net_total_production_for_any_month = () =>
      {
        var parkland75Percent = new Oppurtunity();
        parkland75Percent.WorkingInterest(75m.Percent());
        var declineCurve = new DeclineCurve();
        declineCurve.Composition<Gas>(50m.Percent());
        declineCurve.Composition<Oil>(50m.Percent());
        declineCurve.Add(0, 100.BOED());
        parkland75Percent.DeclinesUsing(declineCurve);

        var schedule = new DrillSchedule();
        var jan2013 = new Month(2013, 01);
        schedule.Include(parkland75Percent.BringOnlineOn(jan2013));
        schedule.EstimatedNetProductionFor<All>(jan2013).ShouldEqual(75.BOED());
        schedule.EstimatedNetProductionFor<Gas>(jan2013).ShouldEqual(37.5m.BOED());
        schedule.EstimatedNetProductionFor<Oil>(jan2013).ShouldEqual(37.5m.BOED());
      };
    }
  }
}