test
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"displayName": "Exercise 13: Domain Reload",
|
||||
"description": "In this section, you will learn how to invoke and wait for Domain Reloads.",
|
||||
"interactiveImport": true
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6246a1e625ae5af419d487a5ea411fe6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Tests_13
|
||||
{
|
||||
internal class ScriptAddingTests
|
||||
{
|
||||
private const string pathToFile = "Assets/Tests_13/TempScript.cs";
|
||||
|
||||
[Test]
|
||||
public void YourTestGoesHere()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void CreateScript()
|
||||
{
|
||||
try
|
||||
{
|
||||
File.WriteAllText(pathToFile, @"
|
||||
public class MyTempScript {
|
||||
public string Verify()
|
||||
{
|
||||
return ""OK"";
|
||||
}
|
||||
}");
|
||||
}
|
||||
catch(DirectoryNotFoundException)
|
||||
{
|
||||
Assert.Inconclusive("The path to file is incorrect. Please make sure that the path to TempScript is valid.");
|
||||
}
|
||||
}
|
||||
|
||||
private string VerifyScript()
|
||||
{
|
||||
Type type = Type.GetType("MyTempScript", true);
|
||||
|
||||
object instance = Activator.CreateInstance(type);
|
||||
|
||||
var verifyMethod = type.GetMethod("Verify", BindingFlags.Instance | BindingFlags.Public);
|
||||
|
||||
var verifyResult = verifyMethod.Invoke(instance, new object[0]);
|
||||
return verifyResult as string;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f91b52cce32b41f4ca03614ee5952c97
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "Tests_13",
|
||||
"references": [
|
||||
"UnityEngine.TestRunner",
|
||||
"UnityEditor.TestRunner"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": true,
|
||||
"precompiledReferences": [
|
||||
"nunit.framework.dll"
|
||||
],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [
|
||||
"UNITY_INCLUDE_TESTS"
|
||||
],
|
||||
"versionDefines": []
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2388d698e32db54d9882271c4a1ac0e
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user