コード例 #1
0
        public void New_CmdletInputTypeAttribute_AcceptsNullCLRType()
        {
            var attribute = new CmdletInputTypeAttribute((Type)null);

            Assert.False(attribute.IsCLRType);
            Assert.Equal("None", attribute.Name);
        }
コード例 #2
0
        public void New_CmdletInputTypeAttribute_AcceptsCLRType()
        {
            var attribute = new CmdletInputTypeAttribute(typeof(string));

            Assert.True(attribute.IsCLRType);
            Assert.Equal(typeof(string).Name, attribute.Name);
        }
コード例 #3
0
        public void New_CmdletInputTypeAttribute_String(string parameter, string expected)
        {
            var attribute = new CmdletInputTypeAttribute(parameter);

            Assert.False(attribute.IsCLRType);
            Assert.Null(attribute.Type);
            Assert.Equal(expected, attribute.Name);
        }