Beispiel #1
0
        public void Ctor_WithNullRegionRoot_ThrowsArgumentNullException()
        {
            var amount     = 1000m;
            var periodRoot = PeriodMother.CreateSimpleTree();

            new EstimatedSaleCube(amount, null, periodRoot);
        }
Beispiel #2
0
        public void Ctor_WithNegativeAmount_ThrowsArgumentOutOfRangeException()
        {
            var amount     = -100m;
            var regionRoot = RegionMother.CreateSimpleTree();
            var periodRoot = PeriodMother.CreateSimpleTree();

            new EstimatedSaleCube(amount, regionRoot, periodRoot);
        }
Beispiel #3
0
        public void Ctor_WithValidArguments_Test()
        {
            var amount = 1000m;
            var region = RegionMother.CreateSimpleModel();
            var period = PeriodMother.CreateSimpleModel();
            var model  = new EstimatedSaleAllocation(amount, region, period);

            Assert.That(model.Amount, Is.EqualTo(amount));
            Assert.That(model.RegionDimension, Is.EqualTo(region));
            Assert.That(model.PeriodDimension, Is.EqualTo(period));
        }
Beispiel #4
0
        public void Ctor_WithValidArguments_CreatesModel()
        {
            var amount     = 1000m;
            var regionRoot = RegionMother.CreateSimpleTree();
            var periodRoot = PeriodMother.CreateSimpleTree();
            var model      = new EstimatedSaleCube(amount, regionRoot, periodRoot);

            Assert.That(model.Amount, Is.EqualTo(amount));
            Assert.That(model.RegionRoot, Is.EqualTo(regionRoot));
            Assert.That(model.PeriodRoot, Is.EqualTo(periodRoot));
        }
Beispiel #5
0
        public static EstimatedSaleAllocation CreateSimpleModel()
        {
            var amount = 1000m;

            return(new EstimatedSaleAllocation(amount, RegionMother.CreateSimpleModel(), PeriodMother.CreateSimpleModel()));
        }
Beispiel #6
0
 public static EstimatedSaleCube CreateSimpleModel()
 {
     return(new EstimatedSaleCube(1000m, RegionMother.CreateSimpleTree(), PeriodMother.CreateSimpleTree()));
 }