public License NewCompositeLicense(IList <License> subLicenses) { IList <License> list = new List <License>(); CompositeLicenseImpl compositeLicense = new CompositeLicenseImpl(); compositeLicense.SubLicenses = subLicenses; return(compositeLicense); }
public void TestInitialize() { base.Initialize(); MockLicensingFactory = (MockLicensingFactory)Ctx.GetObject("MockLicensingFactory"); LicensingFactory = (LicensingFactory)Ctx.GetObject("LicensingFactory"); License license1 = MockLicensingFactory.NewMockLicense(); License license2 = MockLicensingFactory.NewMockLicense(); IList <License> licenses = new List <License>(); licenses.Add(license1); licenses.Add(license2); CompositeLicense = LicensingFactory.NewCompositeLicense(licenses); CompositeLicenseImpl = (CompositeLicenseImpl)CompositeLicense; }
public void TestNewCompositeLicense() { IList <License> subLicenses = new List <License>(); License subLicense1 = MockLicensingFactory.NewMockLicense(); License subLicense2 = MockLicensingFactory.NewMockLicense(); subLicenses.Add(subLicense1); subLicenses.Add(subLicense2); License license = LicensingFactory.NewCompositeLicense(subLicenses); Assert.IsNotNull(license); Assert.IsInstanceOf(typeof(CompositeLicenseImpl), license); CompositeLicenseImpl compositeLicenseImpl = (CompositeLicenseImpl)license; Assert.AreEqual(subLicenses, compositeLicenseImpl.SubLicenses); }