diff --git a/Adventures in Lestoria Tests/ItemTests.cpp b/Adventures in Lestoria Tests/ItemTests.cpp index d641f399..a6f0ed5f 100644 --- a/Adventures in Lestoria Tests/ItemTests.cpp +++ b/Adventures in Lestoria Tests/ItemTests.cpp @@ -193,5 +193,19 @@ namespace ItemTests Assert::IsTrue(disassembleRingTest.expired(),L"Original reference to disassembled ring should now be invalid."); Assert::AreEqual(1U,Inventory::GetItemCount(ITEM_DATA["Ring of the Slime King"].FragmentName()),L"Disassembly has given us a Slime King Ring Fragment."); } + TEST_METHOD(DisassembleNonAccessoryTest){ + try{ + Inventory::Disassemble(Inventory::AddItem("Test Armor"s)); + Assert::Fail(L"Disassembling Test Armor succeeded! This should NOT be allowed!"); + }catch(std::runtime_error&e){} + try{ + Inventory::Disassemble(Inventory::AddItem("Green Slime Remains"s)); + Assert::Fail(L"Disassembling Green Slime Remains succeeded! This should NOT be allowed!"); + }catch(std::runtime_error&e){} + try{ + Inventory::Disassemble(Inventory::AddItem("Health Potion"s)); + Assert::Fail(L"Disassembling a Health Potion succeeded! This should NOT be allowed!"); + }catch(std::runtime_error&e){} + } }; } diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index d250d42d..20f1195a 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_PATCH 3 -#define VERSION_BUILD 10476 +#define VERSION_BUILD 10477 #define stringify(a) stringify_(a) #define stringify_(a) #a