public void RecursionFillingTest() { var faker = new FakerLibrary.Faker(); A test = null; test = faker.Create <A>(); Assert.IsNull(test.b.c.a); }
public void ObjectFillingTest() { var faker = new FakerLibrary.Faker(); object test = null; test = faker.Create <Test1>(); Assert.IsNotNull(test); }
public void ListFillingTest() { var list = new List <Test1> { }; var faker = new FakerLibrary.Faker(); list = faker.Create <List <Test1> >(); Assert.AreNotEqual(list.Count, 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); }
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(); }
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); }
public ListGenerator(Faker MainFaker) { _currentFaker = MainFaker; }
public static void SetFaker(Faker f) { _faker = f; }