public void GetZoneId_positionNull_Expected_exception() { // Arrange. var options = GetFakeConstant(100); RoutingService service = new RoutingService(options); Vector2D position = null; // Act, Assert. Assert.Throws <ArgumentNullException>(() => service.GetZoneId(position)); }
public void GetZoneId_size100_xMinus100_yMinus100_Expected_zone_Minus1_Minus1() { // Arrange. var options = GetFakeConstant(100); RoutingService service = new RoutingService(options); Vector2D position = new Vector2D(-100, -100); // Act. string resultZoneId = service.GetZoneId(position); // Assert. Assert.Equal("zone_-1_-1", resultZoneId); }
public void GetZoneId_size100_x1_y1_Expected_zone_0_0() { // Arrange. var options = GetFakeConstant(100); RoutingService service = new RoutingService(options); Vector2D position = new Vector2D(1, 1); // Act. string resultZoneId = service.GetZoneId(position); // Assert. Assert.Equal("zone_0_0", resultZoneId); }