public static object Object(Type t) { var o = CreateNew.Instance(t); SetRandom.Values(o); return(o); }
public static T Object <T>() { var o = CreateNew.Instance <T>(); SetRandom.Values(o); return(o); }
private static void TestCreate <T>() { var o = CreateNew.Instance <T>(); Assert.IsNotNull(o); Assert.IsInstanceOfType(o, typeof(T)); }
private static void TestCreate(Type t) { var o = CreateNew.Instance(t); Assert.IsNotNull(o); Assert.IsInstanceOfType(o, t); }
public void OnPostEditTestIsCallingUpdate() { var o = CreateNew.Instance <TView>(); OnPostEditAsync(o.Id, o); Assert.AreEqual($"Update {o.Id}", MockRepo.Actions[0]); }
public void OnPostCreateTestIsCallingAdd() { var o = CreateNew.Instance <TView>(); OnPostCreateAsync(o); Assert.AreEqual($"Add {o.Id}", MockRepo.Actions[0]); }
public void InstanceWithDefaultConstructorTest() { var o1 = CreateNew.Instance <testClass2>(); var o2 = CreateNew.Instance <testClass2>(); Assert.IsInstanceOfType(o1, typeof(testClass2)); Assert.AreNotEqual(o1.S, o2.S); Assert.AreNotEqual(o1.I, o2.I); }
public void InstanceTest() { var o1 = CreateNew.Instance <testClass1>(); var o2 = CreateNew.Instance <testClass1>(); Assert.IsInstanceOfType(o1, typeof(testClass1)); Assert.AreNotEqual(o1.S, o2.S); Assert.AreNotEqual(o1.I, o2.I); }
public void CreateDefaultTest() { var o1 = CreateNew.Instance <TestClass2>(); var o2 = CreateNew.Instance <TestClass2>(); Assert.IsInstanceOfType(o1, typeof(TestClass2)); Assert.AreNotEqual(o1.S, o2.S); Assert.AreNotEqual(o1.I, o2.I); }
public void InstanceIsEnumTest() { var s = CreateNew.Instance <IsoGender>(); Assert.IsInstanceOfType(s, typeof(IsoGender)); }
public void InstanceIsStringTest() { var s = CreateNew.Instance <string>(); Assert.IsInstanceOfType(s, typeof(string)); }