Testing a Longest-Common Prefix Implementation Using Model-Based Testing

Wednesday, May 15, 2013

In  my last post I discussed how to implement a Longest-Common Prefix (LCP) algorithm in both an imperative and functional manner in C#.  I also mentioned the fact that for the imperative implementation I needed some to write some unit tests.  Here is the test code: public class LCPTests { public void Get_WithNoValues_ShouldReturnEmptyString() { string result = LCP.Get(new string {}); Assert.AreEqual(0, result.Length); } ...