Exemplo n.º 1
0
 /// <summary>
 /// Convert the value of this <see cref="FlowRouting"/> enumeration to an inp <see cref="string"/>
 /// </summary>
 /// <param name="routingValue">The this object that will be used for the extension method</param>
 /// <returns>Returns: An inp <see cref="string"/> that corresponds to the value of <paramref name="routingValue"/></returns>
 public static string ToInpString(this FlowRouting routingValue) => routingValue switch
 {
Exemplo n.º 2
0
 public void ToInpString_ValidString_ShouldMatchPassedString(string expectedString, FlowRouting value)
 => Assert.Equal(PruneInpString(expectedString, OptionsHeader), new FlowRoutingOption(value).ToInpString());
Exemplo n.º 3
0
 /// <summary>
 /// Convert a string <paramref name="s"/> to
 /// a <see cref="FlowRouting"/> value as per the inp spec.
 /// </summary>
 /// <param name="routing">The value for the extension method</param>
 /// <param name="s">The <see cref="string"/> that will be used to create the value</param>
 /// <returns>Returns: The converted value from the string that will be a <see cref="FlowRouting"/> value</returns>
 public static FlowRouting FromInpString(this FlowRouting routing, string s) => s switch
 {
     // Conversion for the steady flow option
     "STEADY" => FlowRouting.SteadyFlow,
Exemplo n.º 4
0
 public void ParserTests_ValidInpString_ShouldMatchExpectedValue(string value, FlowRouting expectedValue)
 => Assert.Equal(expectedValue, SetupProject(value).Database.GetOption <FlowRoutingOption>().Value);