Adds Item interface
This commit is contained in:
31
PkmnLibRSharpTests/StaticData/ItemTests.cs
Normal file
31
PkmnLibRSharpTests/StaticData/ItemTests.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
using PkmnLibSharp.StaticData;
|
||||
|
||||
namespace PkmnLibRSharpTests.StaticData
|
||||
{
|
||||
public class ItemTests
|
||||
{
|
||||
[Test]
|
||||
public void BasicTests()
|
||||
{
|
||||
using var item = new Item("foobar", ItemCategory.Mail, BattleItemCategory.StatusHealing, 500,
|
||||
Array.Empty<string>());
|
||||
Assert.AreEqual("foobar", item.Name);
|
||||
Assert.AreEqual(ItemCategory.Mail, item.Category);
|
||||
Assert.AreEqual(BattleItemCategory.StatusHealing, item.BattleCategory);
|
||||
Assert.AreEqual(500, item.Price);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void FlagTests()
|
||||
{
|
||||
using var item = new Item("foobar", ItemCategory.Mail, BattleItemCategory.StatusHealing, 500,
|
||||
new []{"foo", "zet"});
|
||||
Assert.That(item.HasFlag("foo"));
|
||||
Assert.That(item.HasFlag("zet"));
|
||||
Assert.That(!item.HasFlag("bar"));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user