/// <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); }
public void ToStringTest() { UsingConfiguration usingConfiguration = new UsingConfiguration(); usingConfiguration.MoveTo = CodeLevel.File; string str = usingConfiguration.ToString(); Assert.AreEqual("Usings: MoveTo - File", str, "Unexpected string representation."); }
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); }
public void CreateTest() { UsingConfiguration usingConfiguration = new UsingConfiguration(); // // Verify default state // Assert.AreEqual( CodeLevel.None, usingConfiguration.MoveTo, "Unexpected default value for MoveTo."); }
/// <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; }