コード例 #1
0
        public void Constructor_ValueAsValueArgument_ShouldSetValueProperty()
        {
            var expectations = Expectations.GetMetadataValues();

            foreach (var e in expectations)
            {
                var attribute = new PartMetadataAttribute("Name", e);

                Assert.AreEqual(e, attribute.Value);
            }
        }
コード例 #2
0
        public void Constructor_ValueAsValueArgument_ShouldSetValueProperty()
        {
            var expectations = Expectations.GetMetadataValues();

            foreach (var e in expectations)
            {
                var attribute = new PartMetadataAttribute("Name", e);

                Assert.AreEqual(e, attribute.Value);
            }
        }
コード例 #3
0
        public void Constructor_ValueAsNameArgument_ShouldSetNameProperty()
        {
            var expectations = Expectations.GetMetadataNames();

            foreach (var e in expectations)
            {
                var attribute = new PartMetadataAttribute(e, "Value");

                Assert.Equal(e, attribute.Name);
            }
        }
コード例 #4
0
        public void Constructor_NullAsNameArgument_ShouldSetNamePropertyToEmptyString()
        {
            var attribute = new PartMetadataAttribute((string)null, "Value");

            Assert.AreEqual(string.Empty, attribute.Name);
        }
コード例 #5
0
        public void Constructor_NullAsNameArgument_ShouldSetNamePropertyToEmptyString()
        {
            var attribute = new PartMetadataAttribute((string)null, "Value");

            Assert.AreEqual(string.Empty, attribute.Name);
        }