public void ExpectedException_1_Vertex_in_PolylineElement()
        {
            //One Vertex in polyline element error
            ElementSet elementSet = new ElementSet("test", "test", ElementType.XYPolyLine, new SpatialReference("DummyID"));

            Oatc.OpenMI.Sdk.Backbone.Element e1 = new Oatc.OpenMI.Sdk.Backbone.Element("e1");
            e1.AddVertex(new Vertex(1, 1, 1));

            elementSet.AddElement(e1);

            ElementSetChecker.CheckElementSet(elementSet);
        }
        public void ExpectedException_1_Vertex_in_PolylineElement()
        {
            //One Coordinate in polyline element error
            ElementSet elementSet = new ElementSet("test", "test", ElementType.PolyLine);

            Oatc.OpenMI.Sdk.Backbone.Element e1 = new Oatc.OpenMI.Sdk.Backbone.Element("e1");
            e1.AddVertex(new Coordinate(1, 1, 1));

            elementSet.AddElement(e1);

            ElementSetChecker.CheckElementSet(elementSet);
        }
        public void ExpectedException_2_Vertices_in_PointElement()
        {
            //Two Vertices in point element error
            ElementSet elementSet = new ElementSet("test", "test", ElementType.XYPoint, new SpatialReference("DummyID"));

            Oatc.OpenMI.Sdk.Backbone.Element e1 = new Oatc.OpenMI.Sdk.Backbone.Element("e1");
            e1.AddVertex(new Vertex(1, 1, 1));
            e1.AddVertex(new Vertex(2, 2, 2));           //here the error is introduced on purpose

            elementSet.AddElement(e1);

            ElementSetChecker.CheckElementSet(elementSet);
        }
        public void ExpectedException_2_Vertices_in_PolygonElement()
        {
            //Two Vertices in polygon element error
            ElementSet elementSet = new ElementSet("test", "test", ElementType.Polygon);

            Oatc.OpenMI.Sdk.Backbone.Element e1 = new Oatc.OpenMI.Sdk.Backbone.Element("e1");
            e1.AddVertex(new Coordinate(1, 1, 1));
            e1.AddVertex(new Coordinate(2, 2, 2));

            elementSet.AddElement(e1);

            ElementSetChecker.CheckElementSet(elementSet);
        }
        public void ExpectedException_WrongOrderingOfPoint_in_PolygonElement()
        {
            //Wrong ordering of vertices in polygon element error
            ElementSet elementSet = new ElementSet("test", "test", ElementType.XYPolygon, new SpatialReference("DummyID"));

            Oatc.OpenMI.Sdk.Backbone.Element e1 = new Oatc.OpenMI.Sdk.Backbone.Element("e1");
            e1.AddVertex(new Vertex(0, 0, 0));
            e1.AddVertex(new Vertex(0, 1, 0));
            e1.AddVertex(new Vertex(1, 1, 0));
            e1.AddVertex(new Vertex(1, 0, 0));

            elementSet.AddElement(e1);

            ElementSetChecker.CheckElementSet(elementSet);
        }
        public void ExpectedException_WrongOrderingOfPoint_in_PolygonElement()
        {
            //Wrong ordering of vertices in polygon element error
            ElementSet elementSet = new ElementSet("test", "test", ElementType.Polygon);

            Oatc.OpenMI.Sdk.Backbone.Element e1 = new Oatc.OpenMI.Sdk.Backbone.Element("e1");
            e1.AddVertex(new Coordinate(0, 0, 0));
            e1.AddVertex(new Coordinate(0, 1, 0));
            e1.AddVertex(new Coordinate(1, 1, 0));
            e1.AddVertex(new Coordinate(1, 0, 0));

            elementSet.AddElement(e1);

            ElementSetChecker.CheckElementSet(elementSet);
        }
        public void ExpectedException_Crossing_lines_in_PolygonElement()
        {
            //Crossing lines in polygon element error
            ElementSet elementSet = new ElementSet("test", "test", ElementType.XYPolygon, new SpatialReference("DummyID"));

            Oatc.OpenMI.Sdk.Backbone.Element e1 = new Oatc.OpenMI.Sdk.Backbone.Element("e1");
            e1.AddVertex(new Vertex(0, 1, 0));
            e1.AddVertex(new Vertex(0, 0, 0));
            e1.AddVertex(new Vertex(1, 0, 0));
            e1.AddVertex(new Vertex(0.9, 1.1, 0));
            e1.AddVertex(new Vertex(1.1, 0.9, 0));

            elementSet.AddElement(e1);

            ElementSetChecker.CheckElementSet(elementSet);
        }
        public void ExpectedException_Crossing_lines_in_PolygonElement()
        {
            //Crossing lines in polygon element error
            ElementSet elementSet = new ElementSet("test", "test", ElementType.Polygon);

            Oatc.OpenMI.Sdk.Backbone.Element e1 = new Oatc.OpenMI.Sdk.Backbone.Element("e1");
            e1.AddVertex(new Coordinate(0, 1, 0));
            e1.AddVertex(new Coordinate(0, 0, 0));
            e1.AddVertex(new Coordinate(1, 0, 0));
            e1.AddVertex(new Coordinate(0.9, 1.1, 0));
            e1.AddVertex(new Coordinate(1.1, 0.9, 0));

            elementSet.AddElement(e1);

            ElementSetChecker.CheckElementSet(elementSet);
        }
        public void ExpectedException_1_Vertex_in_PolylineElement()
        {
            try
            {
                //One Vertex in polyline element error
                ElementSet elementSet = new ElementSet("test", "test", ElementType.XYPolyLine, new SpatialReference("DummyID"));
                HydroNumerics.OpenMI.Sdk.Backbone.Element e1 = new HydroNumerics.OpenMI.Sdk.Backbone.Element("e1");
                e1.AddVertex(new Vertex(1, 1, 1));

                elementSet.AddElement(e1);

                ElementSetChecker.CheckElementSet(elementSet);
            }
            catch (Exception ex)
            {
                Assert.IsTrue(ex.GetType() == typeof(Exception));
            }
        }
        public void ExpectedException_2_Vertices_in_PointElement()
        {
            try
            {
                //Two Vertices in point element error
                ElementSet elementSet = new ElementSet("test", "test", ElementType.XYPoint, new SpatialReference("DummyID"));
                HydroNumerics.OpenMI.Sdk.Backbone.Element e1 = new HydroNumerics.OpenMI.Sdk.Backbone.Element("e1");
                e1.AddVertex(new Vertex(1, 1, 1));
                e1.AddVertex(new Vertex(2, 2, 2)); //here the error is introduced on purpose

                elementSet.AddElement(e1);

                ElementSetChecker.CheckElementSet(elementSet);
            }
            catch (Exception ex)
            {
                Assert.IsTrue(ex.GetType() == typeof(Exception));
            }
        }
        public void ExpectedException_WrongOrderingOfPoint_in_PolygonElement()
        {
            try
            {
                //Wrong ordering of vertices in polygon element error
                ElementSet elementSet = new ElementSet("test", "test", ElementType.XYPolygon, new SpatialReference("DummyID"));
                HydroNumerics.OpenMI.Sdk.Backbone.Element e1 = new HydroNumerics.OpenMI.Sdk.Backbone.Element("e1");
                e1.AddVertex(new Vertex(0, 0, 0));
                e1.AddVertex(new Vertex(0, 1, 0));
                e1.AddVertex(new Vertex(1, 1, 0));
                e1.AddVertex(new Vertex(1, 0, 0));

                elementSet.AddElement(e1);

                ElementSetChecker.CheckElementSet(elementSet);
            }
            catch (Exception ex)
            {
                Assert.IsTrue(ex.GetType() == typeof(Exception));
            }
        }