コード例 #1
0
        public void Constructor_OutOfRangeValueAsCreationPolicyArgument_ShouldSetCreationPolicy()
        {   // Attributes should not throw exceptions
            var expectations = Expectations.GetInvalidEnumValues <CreationPolicy>();

            foreach (var e in expectations)
            {
                var attribute = new PartCreationPolicyAttribute(e);

                Assert.AreEqual(e, attribute.CreationPolicy);
            }
        }
コード例 #2
0
        public void Constructor_ShouldSetCreationPolicyToGivenValue()
        {
            var expectations = Expectations.GetEnumValues <CreationPolicy>();

            foreach (var e in expectations)
            {
                var attribute = new PartCreationPolicyAttribute(e);

                Assert.AreEqual(e, attribute.CreationPolicy);
            }
        }
コード例 #3
0
        public void Constructor_ShouldSetCreationPolicyToGivenValue()
        {
            var expectations = Expectations.GetEnumValues<CreationPolicy>();

            foreach (var e in expectations)
            {
                var attribute = new PartCreationPolicyAttribute(e);

                Assert.AreEqual(e, attribute.CreationPolicy);
            }
        }
コード例 #4
0
        public void Constructor_OutOfRangeValueAsCreationPolicyArgument_ShouldSetCreationPolicy()
        {   // Attributes should not throw exceptions

            var expectations = Expectations.GetInvalidEnumValues<CreationPolicy>();

            foreach (var e in expectations)
            {
                var attribute = new PartCreationPolicyAttribute(e);

                Assert.AreEqual(e, attribute.CreationPolicy);
            }
        }