Example #1
0
        public override void Clear()
        {
            base.Clear();

            fLocationName = string.Empty;
            fMap.Clear();
        }
Example #2
0
        public void Test_Common()
        {
            using (var map = new GDMMap(null)) {
                map.Lati = 5.111111;
                Assert.AreEqual(5.111111, map.Lati);

                map.Long = 7.999999;
                Assert.AreEqual(7.999999, map.Long);

                using (GDMMap map2 = new GDMMap(null)) {
                    Assert.Throws(typeof(ArgumentException), () => {
                        map2.Assign(null);
                    });

                    map2.Assign(map);

                    string buf = TestUtils.GetTagStreamText(map2, 1);
                    Assert.AreEqual("1 MAP\r\n" +
                                    "2 LATI 5.111111\r\n" +
                                    "2 LONG 7.999999\r\n", buf);
                }

                Assert.IsFalse(map.IsEmpty());
                map.Clear();
                Assert.IsTrue(map.IsEmpty());
            }
        }
Example #3
0
        public override void Clear()
        {
            base.Clear();

            fForm = string.Empty;
            fLocation.Clear();
            fMap.Clear();
            fNotes.Clear();
        }
Example #4
0
        public void Test_Common()
        {
            using (var map = new GDMMap()) {
                map.Lati = 5.111111;
                Assert.AreEqual(5.111111, map.Lati);

                map.Long = 7.999999;
                Assert.AreEqual(7.999999, map.Long);

                using (GDMMap map2 = new GDMMap()) {
                    Assert.Throws(typeof(ArgumentException), () => {
                        map2.Assign(null);
                    });

                    //map2.Assign(map);

                    var iRec = new GDMIndividualRecord(null);
                    var evt  = new GDMIndividualEvent();
                    evt.SetName("BIRT");
                    iRec.Events.Add(evt);
                    evt.Place.Map.Assign(map);
                    string buf = TestUtils.GetTagStreamText(iRec, 1);
                    Assert.AreEqual("0 INDI\r\n" +
                                    "1 SEX U\r\n" +
                                    "1 BIRT\r\n" +
                                    "2 PLAC\r\n" +
                                    "3 MAP\r\n" +
                                    "4 LATI 5.111111\r\n" +
                                    "4 LONG 7.999999\r\n", buf);
                }

                Assert.IsFalse(map.IsEmpty());
                map.Clear();
                Assert.IsTrue(map.IsEmpty());
            }
        }