Exemple #1
0
        public void ZeroValue1()
        {
            int   count             = 0;
            Money valueToDistribute = new Money(5000);

            decimal calculatedValue = GoodExample.CalculateDistributedValue(count, valueToDistribute);
        }
Exemple #2
0
        public void ResultsNull()
        {
            EntityCollection results = null;

            bool isEmpty = GoodExample.DetermineResultCount(results);

            Assert.IsTrue(isEmpty);
        }
Exemple #3
0
        public void ResultsEntitiesNullZero()
        {
            EntityCollection results = new EntityCollection();

            bool isEmpty = GoodExample.DetermineResultCount(results);

            Assert.IsTrue(isEmpty);
        }
        public void NullValue1()
        {
            Entity parentAccount = new Entity("lat_distributeentity");

            Money distributedValue = GoodExample.GetValueToDistribute(parentAccount);

            Assert.IsNull(distributedValue);
        }
Exemple #5
0
        public void ResultsEntitiesHasCount()
        {
            EntityCollection results = new EntityCollection();

            results.Entities.Add(new Entity("lat_distributeentity"));

            bool isEmpty = GoodExample.DetermineResultCount(results);

            Assert.IsFalse(isEmpty);
        }
        public void GoodStatus1()
        {
            Money distributedValue = new Money(5000);

            OptionSetValue expectedValue = new OptionSetValue(807990000);

            OptionSetValue valueStatus = GoodExample.DetermineStatusValue(distributedValue);

            Assert.AreEqual(valueStatus, expectedValue);
        }
Exemple #7
0
        public void ValidValue1()
        {
            int     count             = 1;
            Money   valueToDistribute = new Money(5000);
            decimal expectedValue     = 5000;

            decimal calculatedValue = GoodExample.CalculateDistributedValue(count, valueToDistribute);

            Assert.AreEqual(calculatedValue, expectedValue);
        }
Exemple #8
0
        public void ZeroValue2()
        {
            int     count             = 5;
            Money   valueToDistribute = new Money(0);
            decimal expectedValue     = 0;

            decimal calculatedValue = GoodExample.CalculateDistributedValue(count, valueToDistribute);

            Assert.AreEqual(calculatedValue, expectedValue);
        }
        public void ValidValue()
        {
            Entity parentAccount = new Entity("lat_distributeentity");

            parentAccount["lat_valuetodistribute"] = new Money(5000);

            Money expected = new Money(5000);

            Money distributedValue = GoodExample.GetValueToDistribute(parentAccount);

            Assert.AreEqual(distributedValue, expected);
        }
Exemple #10
0
        public void ValidValue()
        {
            Entity parentRecord = new Entity("lat_distributeentity");

            parentRecord["lat_valuetodistribute"] = new Money(5000);

            EntityCollection results = new EntityCollection();

            results.Entities.Add(new Entity("lat_distributeentity"));

            Money expectedValue = new Money(5000);

            Money distributedValue = GoodExample.DetermineDistributedValue(parentRecord, results);

            Assert.AreEqual(distributedValue, expectedValue);
        }