public void TryParse_should_not_move_offset_on_invalid_input() { var offset = 1; PropertyFragment.TryParse(" %l", ref offset); offset.Should().Be(1); }
public void TryParse_should_move_offset_accordingly() { var offset = 1; PropertyFragment.TryParse($" %p({PropNameInt})", ref offset); offset.Should().Be(5 + PropNameInt.Length); }
public void TryParse_should_be_case_insensitive(string input) { var offset = 1; PropertyFragment.TryParse(input, ref offset).Should().NotBeNull(); }
public void TryParse_should_return_null_on_invalid_input(string input) { var offset = 1; PropertyFragment.TryParse(input, ref offset).Should().BeNull(); }
public void TryParse_should_parse_fragment_with_format() { var offset = 1; PropertyFragment.TryParse($" %p({PropNameDbl}:0.00)", ref offset).Should().Be(new PropertyFragment(PropNameDbl, "0.00")); }
public void TryParse_should_parse_fragment_without_format() { var offset = 1; PropertyFragment.TryParse($" %p({PropNameInt})", ref offset).Should().Be(new PropertyFragment(PropNameInt, null)); }