Ejemplo n.º 1
0
        /// <summary>
        /// Creates a clone of this instance.
        /// </summary>
        /// <returns>
        /// A new object that is a copy of this instance.
        /// </returns>
        public object Clone()
        {
            TabConfiguration clone = new TabConfiguration();

            clone._tabStyle     = _tabStyle;
            clone._spacesPerTab = _spacesPerTab;

            return(clone);
        }
Ejemplo n.º 2
0
        public void CreateTest()
        {
            TabConfiguration tabConfiguration = new TabConfiguration();

            //
            // Verify default state
            //
            Assert.AreEqual(TabStyle.Spaces, tabConfiguration.TabStyle, "Unexpected default value for Style.");
            Assert.AreEqual(4, tabConfiguration.SpacesPerTab, "Unexpected default value for SpacesPerTab.");
        }
Ejemplo n.º 3
0
        public void ToStringTest()
        {
            TabConfiguration tabConfiguration = new TabConfiguration();
            tabConfiguration.TabStyle = TabStyle.Spaces;
            tabConfiguration.SpacesPerTab = 8;

            string str = tabConfiguration.ToString();

            Assert.AreEqual("Tabs: Spaces, 8", str, "Unexpected string representation.");
        }
Ejemplo n.º 4
0
        public void CloneTest()
        {
            TabConfiguration tabConfiguration = new TabConfiguration();
            tabConfiguration.TabStyle = TabStyle.Tabs;
            tabConfiguration.SpacesPerTab = 8;

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

            Assert.AreEqual(tabConfiguration.TabStyle, clone.TabStyle);
            Assert.AreEqual(tabConfiguration.SpacesPerTab, clone.SpacesPerTab);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Creates a clone of this instance.
        /// </summary>
        /// <returns>
        /// A new object that is a copy of this instance.
        /// </returns>
        public object Clone()
        {
            TabConfiguration clone = new TabConfiguration();

            clone._tabStyle = _tabStyle;
            clone._spacesPerTab = _spacesPerTab;

            return clone;
        }