public void ReturnCorrectStringArray_WhenCalledWithOneData() { // Arrange SUT action = new SUT(Tools.GetXmlFragment("AddRegValueToHKCU_Reg_MULTI_SZ.CustAct")); string testData = @"Data1"; string[] actualData; // Act actualData = action.GetStringData(testData); // Assert Assert.AreEqual(1, actualData.Length); Assert.AreEqual("Data1", actualData[0]); }
public void ReturnCorrectStringArray_WhenCalledWithTwoDataAndEscapedBackslash() { // Arrange SUT action = new SUT(Tools.GetXmlFragment("AddRegValueToHKCU_Reg_MULTI_SZ.CustAct")); string testData = @"Data1\Data2\\Data3"; string[] actualData; // Act actualData = action.GetStringData(testData); // Assert Assert.AreEqual(2, actualData.Length); Assert.AreEqual("Data1", actualData[0]); Assert.AreEqual(@"Data2\Data3", actualData[1]); }