public void AddOnePointTest()
        {
            IList <Point> points = new List <Point> {
                new Point
                {
                    X = 5,
                    Y = 5
                }
            };

            _client.AddList("Test");
            _client.AddPoints(points, "Test");
            var response = _client.GetPoints("Test");

            CollectionAssert.AreEquivalent(points, response.Points);
        }
Ejemplo n.º 2
0
        public void AddSquarePointsTest()
        {
            IList <Square> squares = new List <Square>();

            for (int i = 1; i <= 10; i++)
            {
                squares.Add(new Square($"-{i} -{i}.-{i} {i}.{i} -{i}.{i} {i}"));
            }
            _client.AddList("Test");

            foreach (var square in squares)
            {
                _client.AddPoints(square.Points, "Test");
            }
            var response = _client.GetSquares("Test");

            CollectionAssert.AreEquivalent(squares, response.Squares);
            CustomAsserts.SquarePointsAreSorted(response.Squares);
        }
        public void AddOneListTest()
        {
            RetrieveListsResponse expectedJsonResult = new RetrieveListsResponse
            {
                ListNames = new List <string> {
                    "Test"
                }
            };

            _client.AddList("Test");
            var jsonResult = _client.GetLists();

            Assert.AreEqual(expectedJsonResult.ListNames, jsonResult.ListNames);
        }