test
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"displayName": "Exercise 16: Custom Attributes",
|
||||
"description": "In this section we will look at some ways of implementing custom NUnit attributes, which can be used to alter test execution.",
|
||||
"interactiveImport": true
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25bdf6efc4a196548b91593681579241
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using UnityEngine;
|
||||
|
||||
public class MyClass
|
||||
{
|
||||
public bool DoSomething()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool DoSomethingElse()
|
||||
{
|
||||
// here is a regression that somebody made. It seems slow
|
||||
Thread.Sleep(500);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 561e8df171c2cf7438064bdbe304f1d6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "MyGame_16"
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ebc0af4a5a9b7c24a8eb3fdfc06ddf9b
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 059b2220fa3ddcb4d825a313ad7df194
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,27 @@
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Tests_16
|
||||
{
|
||||
public class MyClassTests
|
||||
{
|
||||
[Test]
|
||||
public void SomethingReturnsTrue()
|
||||
{
|
||||
var classUnderTest = new MyClass();
|
||||
|
||||
var result = classUnderTest.DoSomething();
|
||||
|
||||
Assert.That(result, Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SomethingElseReturnsTrue()
|
||||
{
|
||||
var classUnderTest = new MyClass();
|
||||
|
||||
var result = classUnderTest.DoSomethingElse();
|
||||
|
||||
Assert.That(result, Is.True);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3bb9b61423de9a74695b54b9559cdaa1
|
||||
timeCreated: 1579981391
|
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "Tests_16",
|
||||
"references": [
|
||||
"UnityEngine.TestRunner",
|
||||
"UnityEditor.TestRunner",
|
||||
"MyGame_16"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": true,
|
||||
"precompiledReferences": [
|
||||
"nunit.framework.dll"
|
||||
],
|
||||
"autoReferenced": false,
|
||||
"defineConstraints": [
|
||||
"UNITY_INCLUDE_TESTS"
|
||||
],
|
||||
"versionDefines": []
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6628e9de2254bd3498a9630245115950
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user