public void TrimLeftMoreCharsThanValue() { // Arrange var excpectedKey = ParamValue.Param.token; var value = "test-token"; var paramValue = new ParamValue(excpectedKey, value); // Act var actual = paramValue.TrimLeft(value.Length + 1); // Assert Assert.IsNull(actual); }
public void TrimLeftZeroChars() { // Arrange var excpectedKey = ParamValue.Param.token; var expectedValue = "test-token"; var paramValue = new ParamValue(excpectedKey, expectedValue); // Act var actual = paramValue.TrimLeft(0); // Assert Assert.AreEqual(expectedValue, actual.Value); Assert.AreEqual(excpectedKey, actual.Key); }
public void TrimLeft() { // Arrange var excpectedKey = ParamValue.Param.token; var toTrim = "asdf"; var expectedValue = "test-token"; var paramValue = new ParamValue(excpectedKey, $"{toTrim}{expectedValue}"); // Act var actual = paramValue.TrimLeft(toTrim.Length); // Assert Assert.AreEqual(expectedValue, actual.Value); Assert.AreEqual(excpectedKey, actual.Key); }