PkmnLibRSharp/PkmnLibRSharpTests/StaticData/ItemTests.cs

31 lines
963 B
C#

using System;
using NUnit.Framework;
using PkmnLibSharp.StaticData;
namespace PkmnLibRSharpTests.StaticData
{
public class ItemTests
{
[Test]
public void BasicTests()
{
var item = Item.Create("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()
{
var item = Item.Create("foobar", ItemCategory.Mail, BattleItemCategory.StatusHealing, 500,
new []{"foo", "zet"});
Assert.That(item.HasFlag("foo"));
Assert.That(item.HasFlag("zet"));
Assert.That(!item.HasFlag("bar"));
}
}
}