public void Init() { clientType = new ClientType("Тестовый тип клиента") { Id = 1 }; serviceProgram = new ClientServiceProgram("Тестовая программа") { Id = 2 }; region = new ClientRegion("Тестовый регион") { Id = 3 }; legal = new LegalForm("ООО", EconomicAgentType.JuridicalPerson) { Id = 5 }; juridicalPerson = new JuridicalPerson(legal) { Id = 6 }; client = new Client("Тестовый клиент", clientType, ClientLoyalty.Customer, serviceProgram, region, 5) { Id = 4 }; clientOrganization = new ClientOrganization("Тестовая организация клиента", "Тестовая организация клиента", juridicalPerson) { Id = 7 }; var employee = new Employee("Иван", "Рюрикович", "Васильевич", new EmployeePost("Царь"), null); user = new User(employee, "И.В. Грозный", "ivanvas", "ivanvas", new Team("Тестовая команда", null), null); }
public void Init() { // инициализация IoC IoCInitializer.Init(); dealRepository = Mock.Get(IoCContainer.Resolve <IDealRepository>()); clientContractIndicatorService = Mock.Get(IoCContainer.Resolve <IClientContractIndicatorService>()); dealIndicatorService = Mock.Get(IoCContainer.Resolve <IDealIndicatorService>()); blockingService = new BlockingService(dealRepository.Object, dealIndicatorService.Object, clientContractIndicatorService.Object); var employee = new Employee("Иван", "Рюрикович", "Васильевич", new EmployeePost("Царь"), null); user = new User(employee, "И.В. Грозный", "ivanvas", "ivanvas", new Team("Тестовая команда", null), null); var clientType = new ClientType("Тестовый тип клиента"); var region = new ClientRegion("Дубовка"); var clientServiceProgram = new ClientServiceProgram("Программа удовлетворения клиента"); clientOk = new Client("Клиент без блокировки", clientType, ClientLoyalty.Follower, clientServiceProgram, region, 5); clientWithManualBlocking = new Client("Клиент с ручной блокировкой", clientType, ClientLoyalty.Follower, clientServiceProgram, region, 5); clientWithManualBlocking.Block(user); clientWithPaymentDelayBlocking = new Client("Клиент с блокировкой по просрочке платежа", clientType, ClientLoyalty.Follower, clientServiceProgram, region, 5); clientWithCreditLimitBlocking = new Client("Клиент с блокировкой по кредитному лимиту", clientType, ClientLoyalty.Follower, clientServiceProgram, region, 5); dealWithPrePayment = new Deal("Сделка с предоплатой", user); dealWithPrePayment.AddQuota(new DealQuota("Quota 1 с предоплатой", 7)); dealWithPostPayment14d20k = new Deal("Сделка с отсрочкой платежа 14 дн 20k", user); dealWithPostPayment14d20k.AddQuota(new DealQuota("Quota 2 с отсрочкой платежа 14 дн 20k", 8, 14, 20000.0M)); dealWithPostPayment7d40k = new Deal("Сделка с отсрочкой платежа 7 дн 40k", user); dealWithPostPayment7d40k.AddQuota(new DealQuota("Quota 3 с отсрочкой платежа 7 дн 40k", 8, 7, 40000.0M)); dealWithPostPayment10d30k = new Deal("Сделка с отсрочкой платежа 10 дн 30k", user); dealWithPostPayment10d30k.AddQuota(new DealQuota("Quota 4 с отсрочкой платежа 10 дн 30k", 8, 10, 30000.0M)); }
public void Init() { clientType = new ClientType("Тестовый тип клиента") { Id = 1 }; serviceProgram = new ClientServiceProgram("Тестовая программа") { Id = 2 }; region = new ClientRegion("Тестовый регион") { Id = 3 }; client = new Client("Тестовый клиент", clientType, ClientLoyalty.Customer, serviceProgram, region, 5) { Id = 4 }; user = new User(new Employee("Иван", "Иванов", "Иванович", new EmployeePost("Менеджер"), null), "Иванов Иван", "ivanov", "pa$$w0rd", new Team("Тестовая команда", null), null); var juridicalLegalForm = new LegalForm("ООО", EconomicAgentType.JuridicalPerson); juridicalPerson = new JuridicalPerson(juridicalLegalForm) { Id = 1 }; accountOrganization = new AccountOrganization("Тестовое юридическое лицо", "Тестовое юридическое лицо", juridicalPerson) { Id = 1 }; clientOrganization = new ClientOrganization("Тестовая организация клиента", "Тестовая организация клиента", new JuridicalPerson(juridicalLegalForm) { Id = 2 }) { Id = 3 }; contract = new ClientContract(accountOrganization, clientOrganization, "12", "1", DateTime.Now, DateTime.Now); }