예제 #1
0
        public void VeryLongParameterValuesAreTrimmed(string initialLongText, string expectedDisplayText)
        {
            var parameter = new ParameterInstance(definition, initialLongText);

            Assert.NotEqual(initialLongText, parameter.ToDisplayText());

            Assert.Equal(expectedDisplayText, parameter.ToDisplayText());
        }
예제 #2
0
        public void MaxParamterColumnWidthCanBeCustomized(string initialLongText, int maxParameterColumnWidth, string expectedDisplayText)
        {
            var summaryStyle = SummaryStyle.Default.WithMaxParameterColumnWidth(maxParameterColumnWidth);
            var parameter    = new ParameterInstance(definition, initialLongText, summaryStyle);

            Assert.Equal(expectedDisplayText, parameter.ToDisplayText());
        }
예제 #3
0
        public void TypeParameterValuesDisplayNotTrimmedTypeNameWithoutNamespace(Type type, string expectedName)
        {
            var parameter = new ParameterInstance(definition, type);

            Assert.Equal(expectedName, parameter.ToDisplayText());
        }
예제 #4
0
        public void TrimmingTheValuesMakesThemActuallyShorter(string initialLongText, string expectedDisplayText)
        {
            var parameter = new ParameterInstance(definition, initialLongText);

            Assert.Equal(expectedDisplayText, parameter.ToDisplayText());
        }
예제 #5
0
        public void ShortParameterValuesDisplayOriginalValue(object value)
        {
            var parameter = new ParameterInstance(definition, value);

            Assert.Equal(value.ToString(), parameter.ToDisplayText());
        }