File tree Expand file tree Collapse file tree
tests/PolylineAlgorithm.Abstraction.Tests/Internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ namespace PolylineAlgorithm . Abstraction . Tests . Internal ;
2+
3+ using PolylineAlgorithm . Abstraction . Internal ;
4+
5+ [ TestClass ]
6+ public class CoordinateVarianceTests {
7+ public static IEnumerable < ( int Latitude , int Longitude ) > Coordinates => [
8+ ( 0 , 0 ) ,
9+ ( 10 , 20 ) ,
10+ ( - 10 , - 20 ) ,
11+ ( 100 , 200 ) ,
12+ ( - 100 , - 200 ) ,
13+ ( 123456789 , 987654321 ) ,
14+ ( - 123456789 , - 987654321 )
15+ ] ;
16+
17+ [ TestMethod ]
18+ public void Constructor_Ok ( ) {
19+ // Arrange & Act
20+ CoordinateVariance variance = new ( ) ;
21+ // Assert
22+ Assert . AreEqual ( 0 , variance . Latitude ) ;
23+ Assert . AreEqual ( 0 , variance . Longitude ) ;
24+ }
25+
26+ [ TestMethod ]
27+ [ DynamicData ( nameof ( Coordinates ) , DynamicDataSourceType . Property ) ]
28+ public void Next_Ok ( int latitude , int longitude ) {
29+ // Arrange
30+ CoordinateVariance variance = new ( ) ;
31+ var expected = ( latitude , longitude ) ;
32+
33+ // Act
34+ variance . Next ( latitude , longitude ) ;
35+
36+ // Assert
37+ Assert . AreEqual ( expected . latitude , variance . Latitude ) ;
38+ Assert . AreEqual ( expected . longitude , variance . Longitude ) ;
39+ }
40+ }
You can’t perform that action at this time.
0 commit comments