예제 #1
0
        public void GeolocationData_should_handle_nulls()
        {
            var geo = new GeolocationData(null);

            Assert.AreEqual(false, geo.HasCoordinates);
            Assert.IsNull(geo.Address);
            Assert.IsNotNull(geo.ToString());
            Assert.AreEqual("", geo.ToString());
        }
예제 #2
0
        public void GeolocationData_should_handle_address()
        {
            var geo = new GeolocationData("Test address");

            Assert.AreEqual(false, geo.HasCoordinates);
            Assert.AreEqual("Test address", geo.Address);
            Assert.AreEqual("Test address", geo.ToString());
        }
예제 #3
0
        public void GeolocationData_should_handle_location()
        {
            var geo = new GeolocationData(1.0123456789, 2.0123456789);

            Assert.AreEqual(true, geo.HasCoordinates);
            Assert.IsNull(geo.Address);
            Assert.AreEqual("1.0123456789,2.0123456789", geo.ToString());
        }