Beispiel #1
0
 public virtual void testEnvelope()
 {
     com.esri.core.geometry.Envelope env = new com.esri.core.geometry.Envelope();
     env.setCoords(100, 200, 250, 300);
     NUnit.Framework.Assert.IsFalse(env.hasAttribute(com.esri.core.geometry.VertexDescription.Semantics
                                                     .M));
     env.addAttribute(com.esri.core.geometry.VertexDescription.Semantics.M);
     NUnit.Framework.Assert.IsTrue(env.hasAttribute(com.esri.core.geometry.VertexDescription.Semantics
                                                    .M));
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .M, 0).isEmpty());
     env.setInterval(com.esri.core.geometry.VertexDescription.Semantics.M, 0, 1, 2);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .M, 0).vmin == 1);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .M, 0).vmax == 2);
     NUnit.Framework.Assert.IsFalse(env.hasAttribute(com.esri.core.geometry.VertexDescription.Semantics
                                                     .Z));
     env.addAttribute(com.esri.core.geometry.VertexDescription.Semantics.Z);
     NUnit.Framework.Assert.IsTrue(env.hasAttribute(com.esri.core.geometry.VertexDescription.Semantics
                                                    .Z));
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .Z, 0).vmin == 0);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .Z, 0).vmax == 0);
     env.setInterval(com.esri.core.geometry.VertexDescription.Semantics.Z, 0, 3, 4);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .Z, 0).vmin == 3);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .Z, 0).vmax == 4);
     NUnit.Framework.Assert.IsFalse(env.hasAttribute(com.esri.core.geometry.VertexDescription.Semantics
                                                     .ID));
     env.addAttribute(com.esri.core.geometry.VertexDescription.Semantics.ID);
     NUnit.Framework.Assert.IsTrue(env.hasAttribute(com.esri.core.geometry.VertexDescription.Semantics
                                                    .ID));
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .ID, 0).vmin == 0);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .ID, 0).vmax == 0);
     env.setInterval(com.esri.core.geometry.VertexDescription.Semantics.ID, 0, 5, 6);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .ID, 0).vmin == 5);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .ID, 0).vmax == 6);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .Z, 0).vmin == 3);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .Z, 0).vmax == 4);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .M, 0).vmin == 1);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .M, 0).vmax == 2);
     env.dropAttribute(com.esri.core.geometry.VertexDescription.Semantics.M);
     NUnit.Framework.Assert.IsFalse(env.hasAttribute(com.esri.core.geometry.VertexDescription.Semantics
                                                     .M));
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .ID, 0).vmin == 5);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .ID, 0).vmax == 6);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .Z, 0).vmin == 3);
     NUnit.Framework.Assert.IsTrue(env.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                     .Z, 0).vmax == 4);
     com.esri.core.geometry.Envelope env1 = new com.esri.core.geometry.Envelope();
     env.copyTo(env1);
     NUnit.Framework.Assert.IsFalse(env1.hasAttribute(com.esri.core.geometry.VertexDescription.Semantics
                                                      .M));
     NUnit.Framework.Assert.IsTrue(env1.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                      .ID, 0).vmin == 5);
     NUnit.Framework.Assert.IsTrue(env1.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                      .ID, 0).vmax == 6);
     NUnit.Framework.Assert.IsTrue(env1.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                      .Z, 0).vmin == 3);
     NUnit.Framework.Assert.IsTrue(env1.queryInterval(com.esri.core.geometry.VertexDescription.Semantics
                                                      .Z, 0).vmax == 4);
 }