示例#1
0
        public void LongitudeValueTest()
        {
            GeoAnchor target   = new GeoAnchor();
            float     expected = 1F;

            target.LongitudeValue = expected;
            float actual = target.LongitudeValue;

            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void IsNotEmptyTest()
        {
            GeoAnchor          target         = new GeoAnchor();
            PrivateObject      po             = new PrivateObject(target);
            GeoAnchor_Accessor targetAccessor = new GeoAnchor_Accessor(po);

            Assert.IsFalse(targetAccessor.IsNotEmpty);
            target.LatitudeAttributeName = "test";
            Assert.IsTrue(targetAccessor.IsNotEmpty);
        }
示例#3
0
        public void LatitudeAttributeNameTest()
        {
            GeoAnchor target   = new GeoAnchor();
            string    expected = string.Empty;

            target.LatitudeAttributeName = expected;
            string actual = target.LatitudeAttributeName;

            Assert.AreEqual(expected, actual);
        }
示例#4
0
        public void GeoAnchorConstructorTest()
        {
            string    latitudeAttr  = string.Empty;
            float     latitudeVal   = 0F;
            string    longitudeAttr = string.Empty;
            float     longitudeVal  = 0F;
            GeoAnchor target        = new GeoAnchor(latitudeAttr, latitudeVal, longitudeAttr, longitudeVal);

            Assert.AreEqual(latitudeAttr, target.LatitudeAttributeName);
            Assert.AreEqual(latitudeVal, target.LatitudeValue);
            Assert.AreEqual(longitudeAttr, target.LongitudeAttributeName);
            Assert.AreEqual(longitudeVal, target.LongitudeValue);
        }
示例#5
0
        public void SerializeTest()
        {
            GeoAnchor           target = new GeoAnchor();
            ArrayList           list   = new ArrayList();
            ArrayListWriterMock writer = new ArrayListWriterMock(list);

            target.Serialize(writer);
            CollectionAssert.AreEqual(list, new [] { false });

            writer.Reset();

            target.LatitudeAttributeName = "test";
            target.Serialize(writer);
            CollectionAssert.AreEqual(list, new object[] { true, target.LatitudeAttributeName, target.LongitudeAttributeName, target.LatitudeValue, target.LongitudeValue });
        }
示例#6
0
 public void GeoAnchorConstructorTest1()
 {
     GeoAnchor target = new GeoAnchor();
 }