Example #1
0
		/// <summary>Copy information from ArchivingLocation object to Location_Type object</summary>
		/// <param name="archivingLocation"></param>
		/// <returns></returns>
		public static LocationType ToIMDILocationType(this ArchivingLocation archivingLocation)
		{
			var returnVal = new LocationType
			{
				Address = archivingLocation.Address
			};
			returnVal.SetContinent(archivingLocation.Continent);
			returnVal.SetCountry(archivingLocation.Country);

			// region is an array
			if (!string.IsNullOrEmpty(archivingLocation.Region))
				returnVal.Region.Add(archivingLocation.Region);

			return returnVal;
		}
Example #2
0
		public void SetContinent_InvalidContinent_ReturnsUnspecified()
		{
			LocationType location = new LocationType();
			location.SetContinent("Narnia");

			Assert.AreEqual("Unspecified", location.Continent.Value);
		}