예제 #1
0
        public static void Default(object defaultValue)
        {
            TestBaseAttribute baseAttribute = new TestBaseAttribute();

            baseAttribute.Default = defaultValue;
            Assert.Equal(defaultValue, baseAttribute.Default);
        }
예제 #2
0
        public static void HelpText(string helpText, Type resourceType, string expected)
        {
            TestBaseAttribute baseAttribute = new TestBaseAttribute();

            baseAttribute.HelpText     = helpText;
            baseAttribute.ResourceType = resourceType;

            Assert.Equal(expected, baseAttribute.HelpText);
        }
예제 #3
0
        public void ThrowsHelpText(string helpText, Type resourceType)
        {
            TestBaseAttribute baseAttribute = new TestBaseAttribute();

            baseAttribute.HelpText     = helpText;
            baseAttribute.ResourceType = resourceType;

            // Verify exception
            Assert.Throws <ArgumentException>(() => baseAttribute.HelpText.ToString());
        }
 protected bool Equals(TestBaseAttribute other)
 {
     if (other is null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(_id == other._id);
 }
 public static void Default(object defaultValue)
 {
     TestBaseAttribute baseAttribute = new TestBaseAttribute();
     baseAttribute.Default = defaultValue;
     Assert.Equal(defaultValue, baseAttribute.Default);
 }