|  | 
| 18 | 18 | package walkingkooka.spreadsheet.viewport; | 
| 19 | 19 | 
 | 
| 20 | 20 | import org.junit.jupiter.api.Test; | 
|  | 21 | +import walkingkooka.net.HasUrlFragmentTesting; | 
|  | 22 | +import walkingkooka.net.UrlFragment; | 
| 21 | 23 | import walkingkooka.reflect.ClassTesting; | 
| 22 | 24 | import walkingkooka.reflect.JavaVisibility; | 
| 23 | 25 | import walkingkooka.spreadsheet.reference.SpreadsheetCellRangeReference; | 
|  | 
| 33 | 35 | import static org.junit.jupiter.api.Assertions.assertThrows; | 
| 34 | 36 | 
 | 
| 35 | 37 | public final class SpreadsheetViewportAnchorTest implements ClassTesting<SpreadsheetViewportAnchor>, | 
| 36 |  | -    ParseStringTesting<SpreadsheetViewportAnchor> { | 
|  | 38 | +    ParseStringTesting<SpreadsheetViewportAnchor>, | 
|  | 39 | +    HasUrlFragmentTesting { | 
| 37 | 40 | 
 | 
| 38 | 41 |     // constants........................................................................................................ | 
| 39 | 42 | 
 | 
| @@ -109,33 +112,6 @@ private void oppositeAndCheck2(final SpreadsheetViewportAnchor anchor, | 
| 109 | 112 |         ); | 
| 110 | 113 |     } | 
| 111 | 114 | 
 | 
| 112 |  | -    // kebabText........................................................................................................ | 
| 113 |  | - | 
| 114 |  | -    @Test | 
| 115 |  | -    public void testKebabTextLeft() { | 
| 116 |  | -        this.kebabTextAndCheck( | 
| 117 |  | -            SpreadsheetViewportAnchor.LEFT, | 
| 118 |  | -            "left" | 
| 119 |  | -        ); | 
| 120 |  | -    } | 
| 121 |  | - | 
| 122 |  | -    @Test | 
| 123 |  | -    public void testKebabTextTopRight() { | 
| 124 |  | -        this.kebabTextAndCheck( | 
| 125 |  | -            SpreadsheetViewportAnchor.TOP_RIGHT, | 
| 126 |  | -            "top-right" | 
| 127 |  | -        ); | 
| 128 |  | -    } | 
| 129 |  | - | 
| 130 |  | -    private void kebabTextAndCheck(final SpreadsheetViewportAnchor anchor, | 
| 131 |  | -                                   final String expected) { | 
| 132 |  | -        this.checkEquals( | 
| 133 |  | -            expected, | 
| 134 |  | -            anchor.kebabText(), | 
| 135 |  | -            () -> anchor + " kebabText" | 
| 136 |  | -        ); | 
| 137 |  | -    } | 
| 138 |  | - | 
| 139 | 115 |     // setLeft........................................................................................................ | 
| 140 | 116 | 
 | 
| 141 | 117 |     @Test | 
| @@ -921,6 +897,32 @@ private void toRowOrRowRangeAnchorAndCheck(final SpreadsheetViewportAnchor ancho | 
| 921 | 897 |         ); | 
| 922 | 898 |     } | 
| 923 | 899 | 
 | 
|  | 900 | +    // HasUrlFragment................................................................................................... | 
|  | 901 | + | 
|  | 902 | +    @Test | 
|  | 903 | +    public void testUrlFragmentNone() { | 
|  | 904 | +        this.urlFragmentAndCheck( | 
|  | 905 | +            SpreadsheetViewportAnchor.NONE, | 
|  | 906 | +            UrlFragment.EMPTY | 
|  | 907 | +        ); | 
|  | 908 | +    } | 
|  | 909 | + | 
|  | 910 | +    @Test | 
|  | 911 | +    public void testUrlFragmentTopLeft() { | 
|  | 912 | +        this.urlFragmentAndCheck( | 
|  | 913 | +            SpreadsheetViewportAnchor.TOP_LEFT, | 
|  | 914 | +            "top-left" | 
|  | 915 | +        ); | 
|  | 916 | +    } | 
|  | 917 | + | 
|  | 918 | +    @Test | 
|  | 919 | +    public void testUrlFragmentLeft() { | 
|  | 920 | +        this.urlFragmentAndCheck( | 
|  | 921 | +            SpreadsheetViewportAnchor.LEFT, | 
|  | 922 | +            "left" | 
|  | 923 | +        ); | 
|  | 924 | +    } | 
|  | 925 | + | 
| 924 | 926 |     // ClassTesting.................................................................................................... | 
| 925 | 927 | 
 | 
| 926 | 928 |     @Override | 
|  | 
0 commit comments