void GenerateTypesFrom(object obj) { var tuple = ReflectionTests.GetTypesFrom(obj); var rootName = tuple.Item1; var typeNames = tuple.Item2; var root = new GameObject(rootName); root.transform.SetParent(transform); foreach (var childName in typeNames) { var child = new GameObject(childName); child.transform.SetParent(root.transform); } }
public void FileCache() { var c1 = new FileCache(Path.Combine(Path.GetTempPath(), "_test"), "jpg", new TimeSpan(8, 22, 19, 35)); var c2 = SandD(c1); Assert.NotNull(c2); #if DEBUG Assert.AreEqual(ReflectionTests.GetFieldValue(c1, "_cacheExpireTime"), ReflectionTests.GetFieldValue(c2, "_cacheExpireTime"), "CacheExpireTimes not equal"); Assert.AreEqual(ReflectionTests.GetFieldValue(c1, "_directory"), ReflectionTests.GetFieldValue(c2, "_directory"), "Directories not equal"); Assert.AreEqual(ReflectionTests.GetFieldValue(c1, "_format"), ReflectionTests.GetFieldValue(c2, "_format"), "Formats not equal"); //ToDo: Test by reflection //Assert.IsTrue(c1.EqualSetup(c2)); #endif }
public static bool Test3() { return(ReflectionTests.FindTypeOfTest()); }
void FindFileFor(object obj) { var assembly = ReflectionTests.GetAssemblyFor(obj); Debug.Log(assembly.Location); }
public static void UnitTest() { ReflectionTests.FindTypeOfTest(); }