public async Task RandomPlayerHelper_GetMonsterItemEscapingSchool_Should_Return_Null() { // Arrange var save = ItemIndexViewModel.Instance.Dataset; ItemIndexViewModel.Instance.Dataset.Clear(); await ItemIndexViewModel.Instance.CreateAsync(new ItemModel { ItemType = ItemTypeEnum.GraduationCapAndRobe }); // Act var result = RandomPlayerHelper.GetMonsterItemEscapingSchool(); // Reset ItemIndexViewModel.Instance.Dataset.Clear(); ItemIndexViewModel.Instance.Dataset = save; // Assert Assert.AreEqual(null, result); }
public async Task RandomPlayerHelper_GetMonsterItemEscapingSchool_Valid_Should_Pass() { // Arrange var save = ItemIndexViewModel.Instance.Dataset; ItemIndexViewModel.Instance.Dataset.Clear(); await ItemIndexViewModel.Instance.CreateAsync(new ItemModel { ItemType = ItemTypeEnum.GraduationCapAndRobe }); await ItemIndexViewModel.Instance.CreateAsync(new ItemModel { ItemType = ItemTypeEnum.Diploma }); await ItemIndexViewModel.Instance.CreateAsync(new ItemModel { ItemType = ItemTypeEnum.FoodCourtCard }); // Act var result = RandomPlayerHelper.GetMonsterItemEscapingSchool(); // Reset ItemIndexViewModel.Instance.Dataset.Clear(); ItemIndexViewModel.Instance.Dataset = save; // Assert Assert.AreNotEqual(ItemTypeEnum.GraduationCapAndRobe, result.ItemType); }