Exemple #1
0
        public void RecursionFillingTest()
        {
            var faker = new FakerLibrary.Faker();
            A   test  = null;

            test = faker.Create <A>();
            Assert.IsNull(test.b.c.a);
        }
Exemple #2
0
        public void ObjectFillingTest()
        {
            var    faker = new FakerLibrary.Faker();
            object test  = null;

            test = faker.Create <Test1>();
            Assert.IsNotNull(test);
        }
Exemple #3
0
        public void ListFillingTest()
        {
            var list  = new List <Test1> {
            };
            var faker = new FakerLibrary.Faker();

            list = faker.Create <List <Test1> >();
            Assert.AreNotEqual(list.Count, 0);
        }
Exemple #4
0
        public void StructFillingTest()
        {
            var   faker = new FakerLibrary.Faker();
            Test2 test  = faker.Create <Test2>();

            Assert.AreNotEqual(test.a, 0);
            Assert.AreNotEqual(test.b, 0);
            Assert.AreNotEqual(test.c, 0.0);
            Assert.AreNotEqual(test.d, "");
            Assert.AreNotEqual(test.ab, 0);
        }
Exemple #5
0
        static void Main(string[] args)
        {
            var faker = new FakerLibrary.Faker();
            var test  = faker.Create <string>();
            var test1 = faker.Create <int>();
            var test5 = faker.Create <Foo>();
            var test6 = faker.Create <List <int> >();
            var test7 = faker.Create <List <Foo> >();
            var test8 = faker.Create <A>();

            Console.ReadKey();
        }
Exemple #6
0
        public void PrimitiveTypeFillingTest()
        {
            int?     i     = null;
            long?    j     = null;
            double?  k     = null;
            DateTime?z     = null;
            string   e     = null;
            var      faker = new FakerLibrary.Faker();

            i = faker.Create <int>();
            j = faker.Create <long>();
            k = faker.Create <double>();
            z = faker.Create <DateTime>();
            e = faker.Create <string>();
            Assert.IsNotNull(i);
            Assert.IsNotNull(j);
            Assert.IsNotNull(k);
            Assert.IsNotNull(z);
            Assert.IsNotNull(e);
        }
Exemple #7
0
 public ListGenerator(Faker MainFaker)
 {
     _currentFaker = MainFaker;
 }
 public static void SetFaker(Faker f)
 {
     _faker = f;
 }