예제 #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()
        {
            UsingConfiguration clone = new UsingConfiguration();

            clone._moveTo = _moveTo;

            return(clone);
        }
예제 #2
0
        public void ToStringTest()
        {
            UsingConfiguration usingConfiguration = new UsingConfiguration();
            usingConfiguration.MoveTo = CodeLevel.File;

            string str = usingConfiguration.ToString();

            Assert.AreEqual("Usings: MoveTo - File", str, "Unexpected string representation.");
        }
예제 #3
0
        public void CloneTest()
        {
            UsingConfiguration usingConfiguration = new UsingConfiguration();
            usingConfiguration.MoveTo = CodeLevel.Namespace;

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

            Assert.AreEqual(
                usingConfiguration.MoveTo,
                clone.MoveTo);
        }
예제 #4
0
        public void CreateTest()
        {
            UsingConfiguration usingConfiguration = new UsingConfiguration();

            //
            // Verify default state
            //
            Assert.AreEqual(
                CodeLevel.None,
                usingConfiguration.MoveTo,
                "Unexpected default value for MoveTo.");
        }
예제 #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()
        {
            UsingConfiguration clone = new UsingConfiguration();

            clone._moveTo = _moveTo;

            return clone;
        }