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

            //add default policy for testing
            defaultTestPolicy = policyService.CreatePolicy(defaultMasterContract, defaultCoverAmount);
        }
예제 #2
0
파일: Global.asax.cs 프로젝트: WimLotz/DDD
        /// <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
파일: Global.asax.cs 프로젝트: WimLotz/DDD
        /// <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;
 }