public void Input_binding_summary_for_dictionary_list_values_as_expected(bool isMappedValue, string expectedSummary) { var request = new TestRequest(); var requestType = request.GetType().GetFlowObjectType(); var requestProperty = requestType[nameof(TestRequest.InputStrings)]; var inputBinding = new FlowValueInputBinding(requestProperty) { FlowValueSelector = new FlowValueListSelector("FlowValue1", "FlowValue2"), MapValue = isMappedValue ? v => v : (Func <object, object>)null, }; var summary = inputBinding.GetSummary(request); Assert.Equal(expectedSummary, summary); }
public void Input_binding_summary_for_dictionary_regex_name_as_expected(bool isMappedValue, bool isMappedName, string expectedSummary) { var request = new TestRequest(); var requestType = request.GetType().GetFlowObjectType(); var requestProperty = requestType[nameof(TestRequest.InputStrings)]; var inputBinding = new FlowValueInputBinding(requestProperty) { FlowValueSelector = new FlowValueRegexSelector("^FlowValue.*", isMappedName ? n => n : (Func <string, string>)null), MapValue = isMappedValue ? v => v : (Func <object, object>)null, }; var summary = inputBinding.GetSummary(request); Assert.Equal(expectedSummary, summary); }