Add tests to test-project
This commit is contained in:
38
test-project/Assets/Tests/EditMode/SampleEditModeTest.cs
Normal file
38
test-project/Assets/Tests/EditMode/SampleEditModeTest.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
public class SampleEditModeTest
|
||||
{
|
||||
[Test]
|
||||
public void TestIncrement()
|
||||
{
|
||||
// Given
|
||||
var counter = new BasicCounter(0);
|
||||
|
||||
// When
|
||||
counter.Increment();
|
||||
|
||||
// Then
|
||||
Assert.AreEqual(1, counter.Count);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestMaxCount()
|
||||
{
|
||||
// Given
|
||||
var counter = new BasicCounter(BasicCounter.MaxCount);
|
||||
|
||||
// When
|
||||
counter.Increment();
|
||||
|
||||
// Then
|
||||
Assert.AreEqual(BasicCounter.MaxCount, counter.Count);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user