Beispiel #1
0
        /// <summary>
        /// Prints the address-line-1 as it would appear as post marked.
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            var data = GetData();

            return(NfString.DistillSpaces(string.Join(" ", data.ThoroughfareNumber, data.ThoroughfareDirectional, data.ThoroughfareName,
                                                      data.ThoroughfareType).Trim()));
        }
Beispiel #2
0
        public void TestDistillSpaces()
        {
            var testResult = NfString.DistillSpaces("              here             is          to many           spaces");

            Assert.IsNotNull(testResult);
            Assert.AreEqual(" here is to many spaces", testResult);

            testResult =
                NfString.DistillSpaces(
                    "            December 31,      2016    2015   (in millions)Net operating losses         ");
            Assert.IsNotNull(testResult);
            Assert.AreEqual(" December 31, 2016 2015 (in millions)Net operating losses ", testResult);
            Console.WriteLine(testResult);
        }