Ejemplo n.º 1
0
 /// <summary>
 /// Converts a <see cref="string"/> to
 /// an <see cref="InfiltrationMethod"/> value using the prescribed
 /// conversions set out in the inp file standard
 /// </summary>
 /// <param name="i">The infiltration method</param>
 /// <param name="inpString">The string that will be used</param>
 /// <returns>Returns: the <see cref="InfiltrationMethod"/> corresponding to the string passed</returns>
 public static InfiltrationMethod FromInpString(this InfiltrationMethod i, string inpString) => inpString switch
 {
     "HORTON" => InfiltrationMethod.Horton,
Ejemplo n.º 2
0
 public void ToInpString_ValidString_ShouldMatchValue(string inpString, InfiltrationMethod expectedMethod)
 => Assert.Equal(PruneInpString(inpString, OptionsHeader), new InfiltrationOption(expectedMethod).ToInpString());
Ejemplo n.º 3
0
 /// <summary>
 /// Converts a <see cref="InfiltrationMethod"/> to its inp string value
 /// </summary>
 /// <param name="method">The method that will be used to convert to a <see cref="string"/></param>
 /// <returns>Returns: the inp value of <paramref name="method"/></returns>
 public static string ToInpString(this InfiltrationMethod method) => method switch
 {
Ejemplo n.º 4
0
 public void ParserTests_ValidInpString(string value, InfiltrationMethod expectedValue)
 => Assert.Equal(expectedValue, SetupProject(value).Database.GetOption <InfiltrationOption>().Value);