Beispiel #1
0
            public void FillFrom_UnmatchedName_False()
            {
                var factory  = new SoegListOutputTypeFactory();
                var names    = new string[] { "first1 middle1 last1", "first1 middle1 middle12 last1", "first2 middle2 last2" };
                var expected = "first1 middle1 middle2 last1";

                var sr = factory.Create(names);
                var bl = new BatchLine()
                {
                    Name = expected
                };
                var success = bl.FillFrom(sr);

                Assert.IsFalse(success);
            }
Beispiel #2
0
            public void FillFrom_Success(int index)
            {
                var factory  = new SoegListOutputTypeFactory();
                var names    = new string[] { "first1 middle1 last1", "first1 middle1 middle12 last1", "first2 middle2 last2" };
                var expected = names.First();

                var names2 = names.Skip(1).ToList();

                names2.Insert(index, expected);

                var sr = factory.Create(names2.ToArray());
                var bl = new BatchLine()
                {
                    Name = expected
                };
                var success = bl.FillFrom(sr);

                Assert.IsTrue(success);
                Assert.AreEqual(expected, bl.MatchedName);
            }