add first unit test

This commit is contained in:
Chikashi Miyama 2019-06-30 14:34:32 +02:00
parent 8e0d7640d4
commit f0b5c319d8
5 changed files with 67 additions and 0 deletions

View file

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

View file

@ -0,0 +1,32 @@
using NUnit.Framework;
using NSubstitute;
namespace UnitTests
{
public class SimpleTest
{
[Test]
public void FirstTest()
{
Assert.AreEqual(10, 10);
}
public interface ISomeInterface
{
void doSomething();
}
[Test]
public void FirstMock()
{
var mock = Substitute.For<ISomeInterface>();
mock.doSomething();
mock.Received(1).doSomething();
}
}
}

View file

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

View file

@ -0,0 +1,9 @@
{
"name": "UnitTest",
"optionalUnityReferences": [
"TestAssemblies"
],
"includePlatforms": [
"Editor"
]
}

View file

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