public void JsonMappingTo_Ctor() { //------------Setup for test-------------------------- var jsonMappingTo = new JsonMappingTo("[[bob]]", 1, false); Assert.AreEqual("bob", jsonMappingTo.DestinationName); Assert.AreEqual("[[bob]]", jsonMappingTo.SourceName); Assert.IsFalse(jsonMappingTo.CanRemove()); Assert.AreEqual(1, jsonMappingTo.IndexNumber); }
public void JsonMappingTo_CanAddRemove_HasSourceAndDestinationName_CanRemoveFalse_CanAddTrue() { //------------Setup for test-------------------------- var jsonMappingTo = new JsonMappingTo(); jsonMappingTo.SourceName = "[[val]]"; jsonMappingTo.DestinationName = "val"; //-------------Assert----------------------------------- Assert.IsFalse(jsonMappingTo.CanRemove()); Assert.IsTrue(jsonMappingTo.CanAdd()); }