예제 #1
0
        public void Constructor2_ValueAsIsPrerequisiteArgument_ShouldSetIsPrerequisiteProperty()
        {
            var expectations = Expectations.GetBooleans();

            foreach (var e in expectations)
            {
                var definition = new ContractBasedImportDefinition("ContractName", (string)null, Enumerable.Empty <KeyValuePair <string, Type> >(), ImportCardinality.ExactlyOne, false, e, CreationPolicy.Any);

                Assert.Equal(e, definition.IsPrerequisite);
            }
        }
예제 #2
0
        public void Constructor2_ValueAsIsRecomposableArgument_ShouldSetIsRecomposableProperty()
        {
            var expectations = Expectations.GetBooleans();

            foreach (var e in expectations)
            {
                var definition = new ImportDefinition(d => true, "", ImportCardinality.ExactlyOne, e, false);

                Assert.Equal(e, definition.IsRecomposable);
            }
        }
예제 #3
0
        public void AllowRecomposition_ValueAsValueArgument_ShouldSetProperty()
        {
            var expectations = Expectations.GetBooleans();

            var attribute = new ImportAttribute();

            foreach (var e in expectations)
            {
                attribute.AllowRecomposition = e;
                Assert.Equal(e, attribute.AllowRecomposition);
            }
        }
예제 #4
0
        public void IsMultiple_ValueAsValueArgument_ShouldSetPropert()
        {
            var expectations = Expectations.GetBooleans();

            var attribute = new ExportMetadataAttribute("Name", "Value");

            foreach (var e in expectations)
            {
                attribute.IsMultiple = e;
                Assert.AreEqual(e, attribute.IsMultiple);
            }
        }