Код: Выделить всё
namespace NuniGameTest;
using Godot;
using Game.Components;
public class Tests {
[SetUp] public void Setup() {
}
// [Test] public void TryInitialize() {
// ResistanceVulnerabilityComponent component = new ResistanceVulnerabilityComponent();
// Assert.That(component, Is.Not.Null);
// Assert.Pass();
// }
[Test] public void Test1() {
// ResistanceVulnerabilityComponent component = new ResistanceVulnerabilityComponent();
// Assert.That(component.IsResistant() , Is.False);
// Assert.That(component.IsVulnerable() , Is.False);
Assert.That(3, Is.EqualTo(1));
Assert.Pass();
}
}
Код: Выделить всё
namespace Game.Components;
using Godot;
public partial class ResistanceVulnerabilityComponent : Node {
public ResistanceVulnerabilityComponent() {}
public bool IsResistant() => false;
public bool IsVulnerable() => false;
}
Я уже:
< li>Создан проект Nunit;
[*]Добавлена ссылка на мой основной csproj в nunit csproj;
[*]Добавлена ссылка на nunit csproj в основном решении; >
Подробнее здесь: https://stackoverflow.com/questions/790 ... unit-tests
Мобильная версия