Пример #1
0
        public void InsertPoint()
        {
            PointRepository pointRepository = new PointRepository();
            Point           point           = new Point();

            point.Id   = -1;
            point.Name = "Point Test";
            Assert.IsTrue(pointRepository.SavePoint(point));
        }
Пример #2
0
        public void UpdatePoint()
        {
            PointRepository pointRepository = new PointRepository();
            List <Point>    points          = pointRepository.GetAllPoints().ToList();
            Point           point           = new Point();

            if (points.Exists(p => p.Name == "Point Test"))
            {
                point.Id   = points.FirstOrDefault(p => p.Name == "Point Test").Id;
                point.Name = "Point Test Updated";
                Assert.IsTrue(pointRepository.SavePoint(point));
            }
        }