2022-09-20 16:03:53 +00:00
|
|
|
using System;
|
|
|
|
using NUnit.Framework;
|
|
|
|
using PkmnLibSharp.StaticData;
|
|
|
|
|
|
|
|
namespace PkmnLibRSharpTests.StaticData
|
|
|
|
{
|
|
|
|
public class ItemTests
|
|
|
|
{
|
|
|
|
[Test]
|
|
|
|
public void BasicTests()
|
|
|
|
{
|
2023-06-25 14:30:12 +00:00
|
|
|
var item = Item.Create("foobar", ItemCategory.Mail, BattleItemCategory.StatusHealing, 500,
|
2022-09-20 16:03:53 +00:00
|
|
|
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()
|
|
|
|
{
|
2023-06-25 14:30:12 +00:00
|
|
|
var item = Item.Create("foobar", ItemCategory.Mail, BattleItemCategory.StatusHealing, 500,
|
2022-09-20 16:03:53 +00:00
|
|
|
new []{"foo", "zet"});
|
|
|
|
Assert.That(item.HasFlag("foo"));
|
|
|
|
Assert.That(item.HasFlag("zet"));
|
|
|
|
Assert.That(!item.HasFlag("bar"));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|