public void GetDocString_ReturnsStringWithCollectionOptions_WhenPassedEnumCollection() { var service = new ParameterService(); var pi = typeof(ParameterServiceTests) .GetMethod("FakeMethod") .GetParameters()[5]; var actual = service.GetDocString(pi, "Required", "type", " | --e"); var expected = "--enumbs | --e (type): This parameter is Required and must be a collection of one of the following (EnumOne, EnumTwo, EnumThree)"; Assert.AreEqual(expected, actual); }
public void GetDocString_ReturnsString_WhenPassedNonEnum() { var service = new ParameterService(); var pi = typeof(ParameterServiceTests) .GetMethod("FakeMethod") .GetParameters()[0]; var actual = service.GetDocString(pi, "Required", "type", " | --f"); var expected = "--foo | --f (type): This parameter is Required"; Assert.AreEqual(expected, actual); }