public void ToInpString_ValidString_ShouldMatchExpected(string expectedString, LinkOffset value)
 => Assert.Equal(PruneInpString(expectedString, OptionsHeader), new LinkOffsetOption(value).ToInpString());
Beispiel #2
0
 /// <summary>
 /// Convert this <see cref="LinkOffset"/> to an inp string
 /// </summary>
 /// <param name="linkOffset">The link offset that will be converted</param>
 /// <returns>Returns: A string that is a valid inp string</returns>
 public static string ToInpString(this LinkOffset linkOffset) => linkOffset switch
 {
 public void ParserTests_ValidString_ShouldMatchExpected(string inpString, LinkOffset expectedLinkOffset)
 => Assert.Equal(expectedLinkOffset, SetupProject(inpString).Database.GetOption <LinkOffsetOption>().Value);
Beispiel #4
0
 /// <summary>
 /// Convert from a <see cref="string"/> to a <see cref="LinkOffset"/> option
 /// </summary>
 /// <param name="linkOffset">The this for the extension method to work</param>
 /// <param name="inpString">The string that will be converted</param>
 /// <returns></returns>
 public static LinkOffset FromInpString(this LinkOffset linkOffset, string inpString) => inpString switch
 {
     "DEPTH" => LinkOffset.DepthOffset,