public void Test_Continue_TextComment_Roundtrips() { var keys = FitsKey.ToContinueKeys(LoremIpsum(), LoremIpsum(), @"LOREM"); Assert.That(keys.Length, Is.EqualTo(14)); Assert.That(keys[0] is IFitsValue <string> key && key.Name == @"LOREM"); var roundTrip = FitsKey.ParseContinuedString(keys, true); Assert.That(roundTrip.Text.AsSpan().SequenceEqual(LoremIpsum())); Assert.That(roundTrip.Comment.AsSpan().SequenceEqual(LoremIpsum())); }
public void Test_Continue_Comment_Roundtrips() { var keys = FitsKey.ToContinueKeys(ReadOnlySpan <char> .Empty, LoremIpsum(), @"LOREM"); Assert.That(keys.Length, Is.EqualTo(7)); Assert.That(keys[0] is IFitsValue <string> key && key.Name == @"LOREM"); var roundTrip = FitsKey.ParseContinuedString(keys, true); Assert.That(string.IsNullOrEmpty(roundTrip.Text)); Assert.That(roundTrip.Comment.AsSpan().SequenceEqual(LoremIpsum())); }