示例#1
0
        public void TestInit()
        {
            policyService = new PolicyApplicationService(new UnitOfWork(new InMemoryRepository()));

            //add default policy for testing
            defaultTestPolicy = policyService.CreatePolicy(defaultMasterContract, defaultCoverAmount);
        }
示例#2
0
        /// <summary>
        /// We dont want to have to deal with the complexity of using databases at this stage.
        /// This basic setup allows us to have an in memory database of sorts without adding 
        /// </summary>
        private static void StartupConfig()
        {
            UnitOfWork = new UnitOfWork(new InMemoryRepository());
            PolicyService = new PolicyApplicationService(UnitOfWork);

            PolicyService.CreatePolicy("0011", 20000);
            PolicyService.CreatePolicy("0011", 1000);
        }
示例#3
0
        /// <summary>
        /// We dont want to have to deal with the complexity of using databases at this stage.
        /// This basic setup allows us to have an in memory database of sorts without adding 
        /// </summary>
        private static void StartupConfig()
        {
            UnitOfWork = new UnitOfWork(new InMemoryRepository());
            PolicyService = new PolicyApplicationService(UnitOfWork);

            PolicyService.CreatePolicy(Guid.Parse("EBA620CF-3414-4F72-997F-0F956D33377A"), "0011", 20000);
            PolicyService.CreatePolicy(Guid.Parse("EBA620CF-3414-4F72-997F-0F956D33377B"), "0011", 1000);
        }
示例#4
0
文件: Program.cs 项目: WimLotz/DDD
 static Program()
 {
     policyApplicationService = new PolicyApplicationService(new UnitOfWork(new InMemoryRepository()));
 }
示例#5
0
 public PolicyController()
 {
     policyService = MvcApplication.PolicyService;
 }