Beispiel #1
0
        public void Enchantments_ShouldNotContainEnchantment()
        {
            // Arrange
            ItemEnchantmentArgument argument = new ItemEnchantmentArgument();

            Enchantments.Set("[\"foo\", \"bar\"]");
            IStringReader reader = new StringReader("baz");

            // Act
            ReadResults readResults = argument.Parse(reader, out _);

            // Assert
            Assert.IsFalse(readResults.Successful);
        }
Beispiel #2
0
        public void ItemEnchantmentArgument_ParseShouldSucceed_WithDefaultNamespace()
        {
            // Arrange
            ItemEnchantmentArgument argument = new ItemEnchantmentArgument();

            Enchantments.Set("[\"foo\", \"bar\"]");
            IStringReader reader = new StringReader("minecraft:foo");

            // Act
            ReadResults readResults = argument.Parse(reader, out _);

            // Assert
            Assert.IsTrue(readResults.Successful);
        }