コード例 #1
0
        public void Properties()
        {
            string alias = "alias";
            bool isExcluded = true;

            ProfileUsageAttribute attribute = new ProfileUsageAttribute();

            Assert.IsTrue(string.IsNullOrEmpty(attribute.Alias),
                "Aliases should be null or empty by default.");
            Assert.IsFalse(attribute.IsExcluded,
                "Excluded state should be false by default.");

            attribute.Alias = alias;
            attribute.IsExcluded = isExcluded;

            Assert.AreEqual(alias, attribute.Alias,
                "Aliases should be equal.");
            Assert.AreEqual(isExcluded, attribute.IsExcluded,
                "Excluded states should be equal.");
        }
コード例 #2
0
        public void Properties()
        {
            string alias      = "alias";
            bool   isExcluded = true;

            ProfileUsageAttribute attribute = new ProfileUsageAttribute();

            Assert.IsTrue(string.IsNullOrEmpty(attribute.Alias),
                          "Aliases should be null or empty by default.");
            Assert.IsFalse(attribute.IsExcluded,
                           "Excluded state should be false by default.");

            attribute.Alias      = alias;
            attribute.IsExcluded = isExcluded;

            Assert.AreEqual(alias, attribute.Alias,
                            "Aliases should be equal.");
            Assert.AreEqual(isExcluded, attribute.IsExcluded,
                            "Excluded states should be equal.");
        }