public void NewSensorParameters_NameOverride_RemovesProperly() { var parameters = new RawSensorParameters("test", "snmplibrary"); ValidateUrl("name_=test", parameters); parameters.AddNameOverride(ObjectProperty.Name, "potato"); ValidateUrl("potato=test", parameters); parameters.Name = "test1"; Assert.AreEqual("test1", parameters.Name); parameters.RemoveNameOverride(ObjectProperty.Name); ValidateUrl("name_=test1", parameters); Assert.AreEqual("test1", parameters.Name); }
public void NewSensorParameters_NameOverride_RemovesWhenNotAdded() { var parameters = new RawSensorParameters("test", "snmplibrary"); Assert.IsFalse(parameters.RemoveNameOverride(ObjectProperty.Name)); }