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 9: UnityTest Attribute",
"description": "This section will introduce you to the custom UnityTest Attribute, which allows for creating test that runs over multiple frames.",
"interactiveImport": true
}

View File

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

View File

@@ -0,0 +1,15 @@
using System;
using UnityEngine;
namespace PlayModeTests_9
{
public class MovementScript : MonoBehaviour
{
public Vector3 velocity;
private void Update()
{
transform.position += velocity * Time.deltaTime;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a2a2480b9e0d4fdeabb0ecede20dfff1
timeCreated: 1670840769

View File

@@ -0,0 +1,6 @@
{
"name": "PlayModeTests_9",
"optionalUnityReferences": [
"TestAssemblies"
]
}

View File

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

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections;
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
namespace PlayModeTests_9
{
public class SkippingFrameTests
{
private GameObject PrepareCube()
{
var go = GameObject.CreatePrimitive(PrimitiveType.Cube);
var rb = go.AddComponent<MovementScript>();
rb.velocity = Vector3.down * 5;
return go;
}
[UnityTest]
public IEnumerator CubeMovesDown()
{
// todo: Create the test body
Assert.Fail("TODO");
yield break;
}
}
}

View File

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