public void Clear_WhenFromAndToHasValue_IsCompleteReturnsFalse() { var interval = new StructureIdInterval(); interval.Set(StructureId.Create(1)); interval.Set(StructureId.Create(2)); interval.Clear(); Assert.IsFalse(interval.IsComplete); }
public void Set_WhenFromIsNotNullButToIs_ToGainsNewId() { var from = StructureId.Create(1); var to = StructureId.Create(2); var interval = new StructureIdInterval(); interval.Set(from); interval.Set(to); Assert.AreEqual(to, interval.To); }
public void Set_WhenFromIsNotNullButToIs_FromRemainsUnchanged() { var from = StructureId.Create(1); var to = StructureId.Create(2); var interval = new StructureIdInterval(); interval.Set(from); interval.Set(to); Assert.AreEqual(from, interval.From); }
public void Clear_WhenFromAndToHasValue_BothBecomesNull() { var interval = new StructureIdInterval(); interval.Set(StructureId.Create(1)); interval.Set(StructureId.Create(2)); interval.Clear(); Assert.IsNull(interval.From); Assert.IsNull(interval.To); }
public void Set_WhenFromAndToHasValue_ToGainsNewId() { var from = StructureId.Create(1); var to = StructureId.Create(2); var newTo = StructureId.Create(3); var interval = new StructureIdInterval(); interval.Set(from); interval.Set(to); interval.Set(newTo); Assert.AreEqual(newTo, interval.To); }
public void Set_WhenFromIsNull_FromBecomesNewId() { var from = StructureId.Create(1); var interval = new StructureIdInterval(); interval.Set(from); Assert.AreEqual(from, interval.From); }