日付を手動で抽出する機能があります。
[TestMethod]
public void TestRemoveTwoDates()
{
String test = "at 06/2/2012 to 12/10/2012";
int[][] actual = String_Parser.RemoveTwoDates(test, "to");
int[][] expected = new int[2][];
expected[0] = new int[3] { 6, 2, 2012 };
expected[1] = new int[3] { 12, 10, 2012 };
CollectionAssert.AreEqual(expected, actual);
}
PS SOをブラウジングすると、配列は変更可能であるため、配列を返すことはお勧めできません。しかし、ループを使用して配列内の各要素をアサートする以外に、これをテストする方法を知りたいです。