public void CommonEnd() { var test1 = new string[] { }; Assert.AreEqual("", test1.CommonEnd()); var test2 = new[] { "12" }; Assert.AreEqual("12", test2.CommonEnd()); var test3 = new[] { "", "", "" }; Assert.AreEqual("", test3.CommonEnd()); var test4 = new[] { "", "12", "" }; Assert.AreEqual("", test4.CommonEnd()); var test5 = new[] { "12", "12", "123" }; Assert.AreEqual("", test5.CommonEnd()); var test6 = new[] { "012", "012", "312" }; Assert.AreEqual("12", test6.CommonEnd()); }