public void SaveEnergySubmissionAndEnergyQuote_Success()
        {
            // Assign
            var energySubmission = new globalVM::Validus.Models.SubmissionEN
            {
                CreatedBy = "InitialSetup",
                CreatedOn = DateTime.Now,
                ModifiedBy = "InitialSetup",
                ModifiedOn = DateTime.Now,
                InsuredName = "- N/A",
                BrokerCode = "1111",
                BrokerPseudonym = "AAA",
                BrokerSequenceId = 822,
                InsuredId = 182396,
                Brokerage = 1,
                BrokerContact = "ALLAN MURRAY",
                //Description = "Test Submission",
                UnderwriterCode = "AED",
                UnderwriterContactCode = "JAC",
                QuotingOfficeId = "LON",
                Leader = "AG",
                Domicile = "AD",
                Title = "Seed Submission",
                SubmissionTypeId = "EN",
                Options = new List<Option>{
                        new Option { 
                            CreatedOn = DateTime.Now,
                            ModifiedBy = "InitialSetup",
                            ModifiedOn = DateTime.Now,
                            Id = 1, 
                            Title = "Seed Submission",
                            OptionVersions = new List<OptionVersion>{
                                new OptionVersion { 
                                    OptionId = 0, 
                                    VersionNumber = 0, 
                                    Comments = "OptionVersion Comments", 
                                    Title = "Unit Test Submission", 
                                    CreatedBy = "InitialSetup",

                                    CreatedOn = DateTime.Now,
                                    ModifiedBy = "InitialSetup",
                                    ModifiedOn = DateTime.Now,
                                    Quotes = new List<Quote>
                                        {
                                            new QuoteEN
                                            { 
                                                COBId = "AD", 
                                                MOA = "FA", 
                                                InceptionDate = DateTime.Now, 
                                                ExpiryDate = DateTime.Now.AddMonths(12), 
                                                QuoteExpiryDate = DateTime.Now, 
                                                AccountYear = 2013, 
                                                Currency = "USD", 
                                                LimitCCY = "USD", 
                                                ExcessCCY = "USD", 
                                                CorrelationToken = Guid.NewGuid(), 
                                                IsSubscribeMaster = true, 
                                                PolicyType = "NONMARINE", 
                                                EntryStatus = "PARTIAL", 
                                                SubmissionStatus = "SUBMITTED", 
                                                TechnicalPricingBindStatus = "PRE", 
                                                TechnicalPricingPremiumPctgAmt = "AMT", 
                                                TechnicalPricingMethod = "UW" ,
                                                OriginatingOfficeId = "LON",

                                                CreatedBy = "InitialSetup",
                                                CreatedOn = DateTime.Now,
                                                ModifiedBy = "InitialSetup",
                                                ModifiedOn = DateTime.Now
                                            }
                                        }
                                }}
                        }}
            };

            // Act
            var consoleRepository = _container.Resolve<IConsoleRepository>();
            var actual = consoleRepository.Add(energySubmission);
            consoleRepository.SaveChanges();

            // Assert
            Assert.IsNotNull(actual);
        }
        private static void SaveTestSubmission(IConsoleRepository consoleRepository)
        {
            var submission = new globalVM::Validus.Models.SubmissionEN
                {
                    CreatedBy = "InitialSetup",
                    CreatedOn = DateTime.Now,
                    ModifiedBy = "InitialSetup",
                    ModifiedOn = DateTime.Now,
                    InsuredName = "- N/A",
                    BrokerCode = "1111",
                    BrokerPseudonym = "AAA",
                    BrokerSequenceId = 822,
                    InsuredId = 182396,
                    Brokerage = 1,
                    BrokerContact = "ALLAN MURRAY",
                   
                    UnderwriterCode = "AED",
                    UnderwriterContactCode = "JAC",
                    QuotingOfficeId = "LON",
                    Leader = "AG",
                    Domicile = "AD",
                    Title = "Unit Test Submission",
                    Options = new List<Option>
                        {
                            new Option
                                {
                                    Id = 1,
                                    Title = "Unit Test Submission",
                                    CreatedBy = "InitialSetup",
                                    CreatedOn = DateTime.Now,
                                    ModifiedBy = "InitialSetup",
                                    ModifiedOn = DateTime.Now,
                                    OptionVersions = new List<OptionVersion>
                                        {
                                            new OptionVersion
                                                {
                                                    OptionId = 0,
                                                    VersionNumber = 0,
                                                    Comments = "OptionVersion Comments",
                                                    Title = "Unit Test Submission",
                                                    CreatedBy = "InitialSetup",
                                                    CreatedOn = DateTime.Now,
                                                    ModifiedBy = "InitialSetup",
                                                    ModifiedOn = DateTime.Now,
                                                    Quotes = new List<Quote>
                                                        {
                                                            new QuoteEN
                                                                {
                                                                    COBId = "AD",
                                                                    MOA = "FA",
                                                                    InceptionDate = DateTime.Now,
                                                                    ExpiryDate = DateTime.Now.AddMonths(12),
                                                                    QuoteExpiryDate = DateTime.Now,
                                                                    AccountYear = 2013,
                                                                    Currency = "USD",
                                                                    LimitCCY = "USD",
                                                                    ExcessCCY = "USD",
                                                                    CorrelationToken = Guid.NewGuid(),
                                                                    IsSubscribeMaster = true,
                                                                    PolicyType = "NONMARINE",
                                                                    EntryStatus = "PARTIAL",
                                                                    SubmissionStatus = "SUBMITTED",
                                                                    TechnicalPricingBindStatus = "PRE",
                                                                    TechnicalPricingPremiumPctgAmt = "AMT",
                                                                    TechnicalPricingMethod = "UW",
                                                                    CreatedBy = "InitialSetup",
                                                                    CreatedOn = DateTime.Now,
                                                                    ModifiedBy = "InitialSetup",
                                                                    ModifiedOn = DateTime.Now,
                                                                    OriginatingOfficeId = "LON",
                                                                }
                                                        }
                                                }
                                        }
                                }
                        }
                };
            var savedSubmission = consoleRepository.Add(submission);
            consoleRepository.SaveChanges();

            _submissionId = savedSubmission.Id;
        }
        public static void CreateComplexEnergySubmission()
        {
            _complexEnergySubmission = new globalVM::Validus.Models.SubmissionEN
            {
                CreatedBy = "InitialSetup",
                CreatedOn = DateTime.Now,
                ModifiedBy = "InitialSetup",
                ModifiedOn = DateTime.Now,

                InsuredName = "- N/A",
                BrokerCode = "1111",
                BrokerPseudonym = "AAA",
                BrokerSequenceId = 822,
                InsuredId = 182396,
                Brokerage = 1,
                BrokerContact = "ALLAN MURRAY",
               
                UnderwriterCode = "AED",
                UnderwriterContactCode = "JAC",
                QuotingOfficeId = "LON",
                Leader = "AG",
                Domicile = "AD",
                Title = "Unit Test Submission",
                SubmissionTypeId = "EN",
                MarketWordingSettings = new List<MarketWordingSetting>(),
                TermsNConditionWordingSettings = new List<TermsNConditionWordingSetting>(),
                SubjectToClauseWordingSettings = new List<SubjectToClauseWordingSetting>(),
                CustomMarketWordingSettings = new List<MarketWordingSetting>(),
                CustomSubjectToClauseWordingSettings = new List<SubjectToClauseWordingSetting>(),
                CustomTermsNConditionWordingSettings = new List<TermsNConditionWordingSetting>(),
                Options = new List<Option>{
                        new Option 
                        { 
                            Id = 1, 
                            Title = "Option 1 - Unit Test Submission",
                            CreatedBy = "InitialSetup",
                            CreatedOn = DateTime.Now,
                            ModifiedBy = "InitialSetup",
                            ModifiedOn = DateTime.Now,
                            OptionVersions = new List<OptionVersion>{
                                new OptionVersion { 
                                    OptionId = 0, 
                                    VersionNumber = 0, 
                                    Comments = "OptionVersion Comments", 
                                    Title = "OptionVersion 1 - Unit Test Submission", 
                                    CreatedBy = "InitialSetup",
                                    CreatedOn = DateTime.Now,
                                    ModifiedBy = "InitialSetup",
                                    ModifiedOn = DateTime.Now,
                                    Quotes = new List<Quote>
                                        {
                                            new QuoteEN
                                            { 
                                                COBId = "AD", 
                                                MOA = "FA", 
                                                InceptionDate = DateTime.Now, 
                                                ExpiryDate = DateTime.Now.AddMonths(12), 
                                                QuoteExpiryDate = DateTime.Now, 
                                                AccountYear = 2013, 
                                                Currency = "USD", 
                                                LimitCCY = "USD", 
                                                ExcessCCY = "USD", 
                                                CorrelationToken = Guid.NewGuid(), 
                                                IsSubscribeMaster = true, 
                                                PolicyType = "NONMARINE", 
                                                EntryStatus = "PARTIAL", 
                                                SubmissionStatus = "SUBMITTED", 
                                                TechnicalPricingBindStatus = "PRE", 
                                                TechnicalPricingPremiumPctgAmt = "AMT", 
                                                TechnicalPricingMethod = "UW" ,
                                                CreatedBy = "InitialSetup",
                                                CreatedOn = DateTime.Now,
                                                ModifiedBy = "InitialSetup",
                                                ModifiedOn = DateTime.Now,
                                                OriginatingOfficeId = "LON"
                                            },
                                            new QuoteEN 
                                            { 
                                                COBId = "AD", 
                                                MOA = "FA", 
                                                InceptionDate = DateTime.Now, 
                                                ExpiryDate = DateTime.Now.AddMonths(12), 
                                                QuoteExpiryDate = DateTime.Now, 
                                                AccountYear = 2013, 
                                                Currency = "USD", 
                                                LimitCCY = "USD", 
                                                ExcessCCY = "USD", 
                                                CorrelationToken = Guid.NewGuid(), 
                                                IsSubscribeMaster = true, 
                                                PolicyType = "NONMARINE", 
                                                EntryStatus = "PARTIAL", 
                                                SubmissionStatus = "SUBMITTED", 
                                                TechnicalPricingBindStatus = "PRE", 
                                                TechnicalPricingPremiumPctgAmt = "AMT", 
                                                TechnicalPricingMethod = "UW" ,
                                                CreatedBy = "InitialSetup",
                                                CreatedOn = DateTime.Now,
                                                ModifiedBy = "InitialSetup",
                                                ModifiedOn = DateTime.Now,
                                                OriginatingOfficeId = "LON"
                                            }
                                        }
                                }}
                        }, 
                        new Option 
                        { 
                            Id = 2, 
                            Title = "Option 2 - Unit Test Submission",
                            CreatedBy = "InitialSetup",
                            CreatedOn = DateTime.Now,
                            ModifiedBy = "InitialSetup",
                            ModifiedOn = DateTime.Now,
                            OptionVersions = new List<OptionVersion>{
                                new OptionVersion { 
                                    OptionId = 0, 
                                    VersionNumber = 0, 
                                    Comments = "OptionVersion Comments", 
                                    Title = "OptionVersion 2 - Unit Test Submission", 
                                    CreatedBy = "InitialSetup",
                                    CreatedOn = DateTime.Now,
                                    ModifiedBy = "InitialSetup",
                                    ModifiedOn = DateTime.Now,
                                    Quotes = new List<Quote>
                                        {
                                            new QuoteEN 
                                            { 
                                                COBId = "AD", 
                                                MOA = "FA", 
                                                InceptionDate = DateTime.Now, 
                                                ExpiryDate = DateTime.Now.AddMonths(12), 
                                                QuoteExpiryDate = DateTime.Now, 
                                                AccountYear = 2013, 
                                                Currency = "USD", 
                                                LimitCCY = "USD", 
                                                ExcessCCY = "USD", 
                                                CorrelationToken = Guid.NewGuid(), 
                                                IsSubscribeMaster = true, 
                                                PolicyType = "NONMARINE", 
                                                EntryStatus = "PARTIAL", 
                                                SubmissionStatus = "SUBMITTED", 
                                                TechnicalPricingBindStatus = "PRE", 
                                                TechnicalPricingPremiumPctgAmt = "AMT", 
                                                TechnicalPricingMethod = "UW" ,
                                                CreatedBy = "InitialSetup",
                                                CreatedOn = DateTime.Now,
                                                ModifiedBy = "InitialSetup",
                                                ModifiedOn = DateTime.Now,
                                                OriginatingOfficeId = "LON",
                                            },
                                            new QuoteEN
                                            { 
                                                COBId = "AD", 
                                                MOA = "FA", 
                                                InceptionDate = DateTime.Now, 
                                                ExpiryDate = DateTime.Now.AddMonths(12), 
                                                QuoteExpiryDate = DateTime.Now, 
                                                AccountYear = 2013, 
                                                Currency = "USD", 
                                                LimitCCY = "USD", 
                                                ExcessCCY = "USD", 
                                                CorrelationToken = Guid.NewGuid(), 
                                                IsSubscribeMaster = true, 
                                                PolicyType = "NONMARINE", 
                                                EntryStatus = "PARTIAL", 
                                                SubmissionStatus = "SUBMITTED", 
                                                TechnicalPricingBindStatus = "PRE", 
                                                TechnicalPricingPremiumPctgAmt = "AMT", 
                                                TechnicalPricingMethod = "UW" ,
                                                CreatedBy = "InitialSetup",
                                                CreatedOn = DateTime.Now,
                                                ModifiedBy = "InitialSetup",
                                                ModifiedOn = DateTime.Now,
                                                OriginatingOfficeId = "LON",
                                            },
                                            new QuoteEN 
                                            { 
                                                COBId = "AD", 
                                                MOA = "FA", 
                                                InceptionDate = DateTime.Now, 
                                                ExpiryDate = DateTime.Now.AddMonths(12), 
                                                QuoteExpiryDate = DateTime.Now, 
                                                AccountYear = 2013, 
                                                Currency = "USD", 
                                                LimitCCY = "USD", 
                                                ExcessCCY = "USD", 
                                                CorrelationToken = Guid.NewGuid(), 
                                                IsSubscribeMaster = true, 
                                                PolicyType = "NONMARINE", 
                                                EntryStatus = "PARTIAL", 
                                                SubmissionStatus = "SUBMITTED", 
                                                TechnicalPricingBindStatus = "PRE", 
                                                TechnicalPricingPremiumPctgAmt = "AMT", 
                                                TechnicalPricingMethod = "UW" ,
                                                CreatedBy = "InitialSetup",
                                                CreatedOn = DateTime.Now,
                                                ModifiedBy = "InitialSetup",
                                                ModifiedOn = DateTime.Now,
                                                OriginatingOfficeId = "LON",
                                            }

                                        }
                                }
                            }
                        }
                }
            };
        }