Ejemplo n.º 1
0
        public void Ctor_Category(string category, bool expectedIsDefaultAttribute)
        {
            var attribute = new CategoryAttribute(category);

            Assert.Equal(category, attribute.Category);
            Assert.Equal(expectedIsDefaultAttribute, attribute.IsDefaultAttribute());
        }
Ejemplo n.º 2
0
        public void IsDefaultAttribute_NullCategory_ThrowsNullReferenceException()
        {
            var attribute = new CategoryAttribute(null);

            Assert.Null(attribute.Category);
            Assert.Throws <NullReferenceException>(() => attribute.IsDefaultAttribute());
        }
Ejemplo n.º 3
0
        public void Ctor_Default()
        {
            var attribute = new CategoryAttribute();

            Assert.Equal("Misc", attribute.Category);
            Assert.True(attribute.IsDefaultAttribute());
        }