25 lines
663 B
C#
25 lines
663 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Text;
|
|
using NUnit.Framework;
|
|
|
|
namespace m3uTool.Tests
|
|
{
|
|
[TestFixture]
|
|
public class LongestCommonSequenceTests
|
|
{
|
|
[Test]
|
|
public void FunctionalityTest()
|
|
{
|
|
//LongestCommonSequence<string> lcs = new LongestCommonSequence<string>();
|
|
//Debug.WriteLine(new string(lcs.LCS("what do we say", "heya".ToCharArray())));
|
|
|
|
List<string> substring = LongestCommonSubstrings.GetLongestSubstring("ABAB", "BABA");
|
|
Assert.AreEqual(2, substring.Count);
|
|
Assert.IsTrue(substring.Contains("ABA"));
|
|
Assert.IsTrue(substring.Contains("BAB"));
|
|
}
|
|
}
|
|
}
|