public void GetAliasString_ReturnsEmptyString_WhenPassedNoAlias() { var service = new ParameterService(); var pi = typeof(ParameterServiceTests) .GetMethod("FakeMethod") .GetParameters()[0]; var actual = service.GetAliasString(pi); Assert.AreEqual("", actual); }
public void GetAliasString_ReturnsString_WhenPassedAlias() { var service = new ParameterService(); var pi = typeof(ParameterServiceTests) .GetMethod("FakeMethod") .GetParameters()[1]; var expectedPrefix = "--"; _mockSetting.Setup(s => s.ArgumentPrefix()).Returns(expectedPrefix); var actual = service.GetAliasString(pi); var expected = $" | {expectedPrefix}{_expectedAlias}"; Assert.AreEqual(expected, actual); }