public void ToStringTest()
        {
            RegionFormatConfiguration regionsConfiguration = new RegionFormatConfiguration();
            regionsConfiguration.EndRegionNameEnabled = true;

            string str = regionsConfiguration.ToString();

            Assert.AreEqual("Regions: EndRegionNameEnabled - True", str, "Unexpected string representation.");
        }
        public void CreateTest()
        {
            RegionFormatConfiguration regionsConfiguration = new RegionFormatConfiguration();

            //
            // Verify default state
            //
            Assert.IsTrue(regionsConfiguration.EndRegionNameEnabled, "Unexpected default value for EndRegionNameEnabled.");
        }
        public void CloneTest()
        {
            RegionFormatConfiguration regionsConfiguration = new RegionFormatConfiguration();
            regionsConfiguration.EndRegionNameEnabled = true;

            RegionFormatConfiguration clone = regionsConfiguration.Clone() as RegionFormatConfiguration;
            Assert.IsNotNull(clone, "Clone did not return a valid instance.");

            Assert.AreEqual(regionsConfiguration.EndRegionNameEnabled, clone.EndRegionNameEnabled);
        }
Exemple #4
0
        /// <summary>
        /// Creates a clone of this instance.
        /// </summary>
        /// <returns>
        /// A new object that is a copy of this instance.
        /// </returns>
        public object Clone()
        {
            RegionFormatConfiguration clone = new RegionFormatConfiguration();

            clone._style = _style;
            clone._endRegionNameEnabled         = _endRegionNameEnabled;
            clone._commentDirectiveBeginFormat  = _commentDirectiveBeginFormat;
            clone._commentDirectiveBeginPattern = _commentDirectiveBeginPattern;
            clone._commentDirectiveEndFormat    = _commentDirectiveEndFormat;
            clone._commentDirectiveEndPattern   = _commentDirectiveEndPattern;

            return(clone);
        }
        /// <summary>
        /// Creates a clone of this instance.
        /// </summary>
        /// <returns>
        /// A new object that is a copy of this instance.
        /// </returns>
        public object Clone()
        {
            RegionFormatConfiguration clone = new RegionFormatConfiguration();

            clone._style = _style;
            clone._endRegionNameEnabled = _endRegionNameEnabled;
            clone._commentDirectiveBeginFormat = _commentDirectiveBeginFormat;
            clone._commentDirectiveBeginPattern = _commentDirectiveBeginPattern;
            clone._commentDirectiveEndFormat = _commentDirectiveEndFormat;
            clone._commentDirectiveEndPattern = _commentDirectiveEndPattern;

            return clone;
        }