This commit is contained in:
2025-01-17 13:10:42 +01:00
commit 4536213c91
15115 changed files with 1442174 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
{
"displayName": "Exercise 15: Test Cases",
"description": "This section will cover [TestCase] and similar NUnit attributes and how to work with them in UnityTests.",
"interactiveImport": true
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3499e5070f879bc49b43ddd03b23c90c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
using System.Collections.Generic;
using System.Threading.Tasks;
public class MyClass
{
public int Add(int a, int b)
{
return a + b;
}
public IEnumerator<int> AddAsync(int a, int b)
{
yield return default;
yield return default;
yield return default;
yield return a + b;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7cf8084a6c8ac9c4fb0e5a79422b8809
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,3 @@
{
"name": "MyGame_15"
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 942cbc8a7548771468cf1d2523fbef4c
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 86b1648ff8fa821449428bf90d50e5a6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System.Collections;
using NUnit.Framework;
using UnityEngine.TestTools;
namespace Tests_15
{
public class MyClassTests
{
[Test]
public void YourTestGoesHere()
{
Assert.Fail();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f6fb51cf012a34e438c022cffa41c8b6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,22 @@
{
"name": "Tests_15",
"references": [
"UnityEngine.TestRunner",
"UnityEditor.TestRunner",
"MyGame_15"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"nunit.framework.dll"
],
"autoReferenced": false,
"defineConstraints": [
"UNITY_INCLUDE_TESTS"
],
"versionDefines": []
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1233dc2110d358a4cbeb6cf521c4457c
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: