コード例 #1
0
        public void ToOrderedSpelling_Is_Correct_4_Names()
        {
            var name1 = new OrderedName("Simon David Stephan LeServe");

            var target = name1.ToOrderedSpelling();

            Assert.AreEqual(target, "LeServe Simon David Stephan");
        }
コード例 #2
0
        public void CompareTo_Multiple_Spaces()
        {
            var name1 = new OrderedName("Simon LeServe");
            var name2 = new OrderedName("Simon     LeServe");

            var target = name1.CompareTo(name2);

            Assert.AreEqual(target, 0);
        }
コード例 #3
0
        public void CompareTo_Different_Given_Names()
        {
            var name1 = new OrderedName("Simon LeServe");
            var name2 = new OrderedName("Sally LeServe");

            var target = name1.CompareTo(name2);

            Assert.AreEqual(target, 1);
        }
コード例 #4
0
        public void CompareTo_Slightly_Different_Names()
        {
            var name1 = new OrderedName("Simon David Stephen LeServe");
            var name2 = new OrderedName("Simon David Stephan LeServe");

            var target = name1.CompareTo(name2);

            Assert.AreEqual(target, 1);
        }
コード例 #5
0
        public void CompareTo_2_And_3_Names()
        {
            var name1 = new OrderedName("Simon LeServe");
            var name2 = new OrderedName("Simon David LeServe");

            var target = name1.CompareTo(name2);

            Assert.AreEqual(target, -1);
        }