Exemplo n.º 1
0
        public void TestRealNameFirstNameOnly()
        {
            Filler <LibraryFillingTest.Person> filler = new Filler <LibraryFillingTest.Person>();

            filler.Setup()
            .OnProperty(x => x.Name).Use(new RealNames(NameStyle.FirstName));

            LibraryFillingTest.Person p = filler.Create();

            Assert.IsNotNull(p);
            Assert.IsNotNull(p.Name);
            Assert.IsFalse(p.Name.Contains(" "));
        }
Exemplo n.º 2
0
        public void TestRealNameLastNameFirstName()
        {
            Filler <LibraryFillingTest.Person> filler = new Filler <LibraryFillingTest.Person>();

            filler.Setup()
            .OnProperty(x => x.Name).Use(new RealNames(NameStyle.LastNameFirstName));

            LibraryFillingTest.Person p = filler.Create();

            Assert.IsNotNull(p);
            Assert.IsNotNull(p.Name);
            Assert.IsTrue(p.Name.Contains(" "));
            Assert.AreEqual(2, p.Name.Split(' ').Length);
        }