public CompanyInformationController(ICompanyInformation _companyInfoView, ICompanyInformationModel _companyInfoModel) { companyInfoModel = _companyInfoModel; companyInfoView = _companyInfoView; companyInfoView.LoadData(_companyInfoModel.CompanyInformation); }
public void AutoAssignTest3() { BeethovenFactory factory = new BeethovenFactory(); var defaultValues1 = new { Name = "The evil company", Address = "2460 Sunshine road" }; DefaultProperty defaultProperty1 = new DefaultProperty() .AnonymousValueLookup(defaultValues1) .SetterGetter(); ICompanyInformation companyInformation = factory.Generate <ICompanyInformation>(defaultProperty1); Assert.AreEqual("The evil company", companyInformation.Name); Assert.AreEqual("2460 Sunshine road", companyInformation.Address); var defaultValues2 = new { Name = "", }; DefaultProperty defaultProperty2 = new DefaultProperty() .AnonymousValueLookup(defaultValues2) .SetterGetter(); companyInformation = factory.Generate <ICompanyInformation>(defaultProperty2); Assert.AreEqual("", companyInformation.Name); Assert.AreEqual(null, companyInformation.Address); }
public void AutoAssignTest6() { TypeDefinition <ICompanyInformation> typeDefinition = TypeDefinition <ICompanyInformation> .Create(new PropertyDefinition <string>("Name") .ConstructorParameter() .SetterGetter()); ICompanyInformation companyInformation = typeDefinition.CreateNew("The evil company"); companyInformation.Name = "Generic Company B"; Assert.AreEqual("Generic Company B", companyInformation.Name); }
public void AutoAssignTest5() { TypeDefinition <ICompanyInformation> typeDefinition = TypeDefinition <ICompanyInformation> .Create(new PropertyDefinition <string>("Name") .ConstructorParameter() .SetterGetter(), new PropertyDefinition <string>("Address") .ConstructorParameter() .SetterGetter()); ICompanyInformation companyInformation = typeDefinition.CreateNew("The evil company", "2460 Sunshine road"); Assert.AreEqual("The evil company", companyInformation.Name); Assert.AreEqual("2460 Sunshine road", companyInformation.Address); }
public ProductVersionInformation(string productName, Bitmap logo16, Bitmap logo32, Bitmap logo128, Uri productWebsite, ICompanyInformation company, Version version, MailAddress mailMessageFrom, MailAddress mailMessageTo) : base(productName, logo16, logo32, logo128, productWebsite) { if (company == null) { throw new ArgumentNullException(nameof(company)); } if (version == null) { throw new ArgumentNullException(nameof(version)); } Company = company; Version = version; MailMessageFrom = mailMessageFrom; MailMessageTo = mailMessageTo; }
public StocksController(StocksContext dbContext, ICompanyInformation companyInformation, IMapper mapper) : base(dbContext, mapper) { _companyInformation = companyInformation; }
public CompanyInformationController(ICompanyInformation companyInformation, ILogService log) { _companyInformation = companyInformation; _log = log; }