Пример #1
0
        private FacebookBonusCalculationInput CreateCalculationInputWith3Policies()
        {
            var firstPolicy = new Policy()
            {
                PolicyNumber = "P001", Premium = 200, StartDate = new DateTime(2016, 05, 06)
            };
            var secondPolicy = new Policy()
            {
                PolicyNumber = "P002", Premium = 100, StartDate = new DateTime(2017, 08, 11)
            };
            var thirdPolicy = new Policy()
            {
                PolicyNumber = "P003", Premium = 100, StartDate = new DateTime(2017, 09, 12)
            };

            var settings = new FacebookBonusSettings()
            {
                BonusPercentage = 3,
                MaximumBonus    = 10,
                PolicySorter    = new FakeSortOrder()
            };

            return(new FacebookBonusCalculationInput()
            {
                PoliciesOfCustomer = new Policy[] { firstPolicy, secondPolicy, thirdPolicy },
                Settings = settings
            });
        }
Пример #2
0
        private FacebookBonusCalculationInput CreateCalculationInputWithSinglePolicy(decimal premium, float percentage)
        {
            var policy = new Policy()
            {
                PolicyNumber = "P001", Premium = premium, StartDate = new DateTime(2016, 05, 06)
            };
            var settings = new FacebookBonusSettings()
            {
                BonusPercentage = percentage,
            };

            return(new FacebookBonusCalculationInput()
            {
                PoliciesOfCustomer = new Policy[] { policy },
                Settings = settings
            });
        }
Пример #3
0
            public static FacebookBonusCalculationInput GetListNotSortingByDate()
            {
                Policy policy2 = new Policy {
                    PolicyNumber = "P002", Premium = 300, StartDate = new DateTime(2017, 11, 8)
                };
                Policy policy1 = new Policy {
                    PolicyNumber = "P001", Premium = 200, StartDate = new DateTime(2016, 5, 12)
                };

                Policy[] policies = new Policy[] { policy1, policy2 };
                FacebookBonusSettings facebookBonusSettings = new FacebookBonusSettings {
                    BonusPercentage = 0.03F, MaximumBonus = 10
                };

                return(new FacebookBonusCalculationInput {
                    PoliciesOfCustomer = policies, Settings = facebookBonusSettings
                });
            }