Exemplo n.º 1
0
 public void TestInitialize()
 {
     base.Initialize();
     MockLicensingFactory = (MockLicensingFactory)Ctx.GetObject("MockLicensingFactory");
     LicensingFactory     = (LicensingFactory)Ctx.GetObject("LicensingFactory");
     License          = MockLicensingFactory.NewMockLicense();
     LicenseCondition = LicensingFactory.NewLicensedCondition(License);
 }
Exemplo n.º 2
0
        public void TestNewLicensedCondition()
        {
            License   license   = MockLicensingFactory.NewMockLicense();
            Condition condition = LicensingFactory.NewLicensedCondition(license);

            Assert.IsNotNull(condition);
            Assert.IsInstanceOf(typeof(LicensedConditionImpl), condition);
            LicensedConditionImpl conditionImpl = (LicensedConditionImpl)condition;

            Assert.AreEqual(license, conditionImpl.License);
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        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);
        }