public void TestSetup() { m_ts1 = m_manager.Track(0, 5); m_ts2 = m_manager.Track(6, 5); m_ts3 = m_manager.Track(12, 5); m_ts4 = m_manager.Track(18, 5); }
public void StringValue_Update_SourceIsChangedProperly() { TrackedStringManager source = new TrackedStringManager("test 123"); TrackedString number = source.Track(5, 3); Assert.AreEqual("123", number.StringValue); number.StringValue = "456"; Assert.AreEqual("test 456", source.Text); }
public TrackedString CreateTS(TrackedStringManager tracker) { string target = tracker.Text.SubstringWithIndices(this.StartIndex, this.EndIndex); int startOffset = 0; // If it's unquoted text, then we need to trim if (!this.IsInsideQuotes) { target = JsonHelper.TrimUnquotedValue(target, out startOffset); } return(tracker.Track(this.StartIndex + startOffset, target.Length)); }