Esempio n. 1
0
        public void TestCustomFakerInConstructor()
        {
            FakerConfig config = new FakerConfig();

            config.Add <TestClosedClass, Int32>(CustomIntGenerator, obj => obj.TestInt);
            Faker faker = new Faker(config);

            TestClosedClass testClass = (TestClosedClass)faker.Create(typeof(TestClosedClass));

            Assert.AreEqual(testClass.TestInt, -1);
        }
Esempio n. 2
0
        public void TestParamConstructor()
        {
            TestClosedClass testClass = FillClass <TestClosedClass>();

            Assert.AreNotEqual(testClass.TestInt, 0);
        }