public void SpellsSearch_DescriptionContainsFilter_DescriptionContainsMansion()
        {
            //Arrange
            List <Spell> spells  = CreateTestData.GetListOfSpells();
            var          mockSet = new Mock <DbSet <Spell> >()
                                   .SetupData(spells, o =>
            {
                return(spells.Single(x => x.Spell_id.CompareTo(o.First()) == 0));
            });

            List <Spell> expected = new List <Spell>();
            Spell        Tower    = new Spell
            {
                Spell_id              = Guid.Parse("46d10bb8-84d2-408d-a928-5847ff99461f"),
                Name                  = "Widogast's Nascent Nine-sided Tower",
                Description           = "A flavored Magnificent Mansion",
                Level                 = 7,
                School_id             = Guid.Parse("361bd911-0702-437f-ab59-a29da0f9fba4"),
                CastingTime           = "1 minute",
                Range                 = "100 feet",
                Duration              = "24 hours",
                RequiresVerbal        = true,
                RequiresSomantic      = true,
                RequiresMaterial      = false,
                RequiresConcentration = true
            };

            expected.Add(Tower);

            using (var mockContext = AutoMock.GetLoose())
            {
                mockContext.Mock <SpellsContext>()
                .Setup(x => x.Spells).Returns(mockSet.Object);
                mockContext.Mock <SpellsContext>()
                .Setup(x => x.Set <Spell>()).Returns(mockSet.Object);

                SpellsContext context = mockContext.Create <SpellsContext>();

                //Act
                SpellSearchToDecorate baseObject = new SpellSearchToDecorate(context);
                DescriptionContains   toTest     = new DescriptionContains("Mansion");
                toTest.setToBeDecorated(baseObject);
                var actual = toTest.GetSpells().ToList();

                //Assert
                actual.Should().BeEquivalentTo(expected);
            }
        }
        public void ItemsSearch_DescriptionContainsFilter_DescriptionContainsGauntlets()
        {
            //Arrange
            List <Item> items   = CreateTestData.GetListOfItems();
            var         mockSet = new Mock <DbSet <Item> >()
                                  .SetupData(items, o =>
            {
                return(items.Single(x => x.Item_id.CompareTo(o.First()) == 0));
            });

            List <Item> expected           = new List <Item>();
            Item        TitanstoneKnuckles = new Item
            {
                Item_id            = Guid.Parse("026a7dff-5e85-4e6d-94c6-6613828e5df6"),
                Name               = "Titanstone Knuckles",
                Description        = "Gauntlets fashioned from the Titan of Stone, enhancing your strength to rival that of the gods.",
                isEquippable       = true,
                isConsumable       = false,
                requiresAttunement = true,
                Value              = 999
            };

            expected.Add(TitanstoneKnuckles);

            using (var mockContext = AutoMock.GetLoose())
            {
                mockContext.Mock <ItemsContext>()
                .Setup(x => x.Items).Returns(mockSet.Object);
                mockContext.Mock <ItemsContext>()
                .Setup(x => x.Set <Item>()).Returns(mockSet.Object);


                ItemsContext context = mockContext.Create <ItemsContext>();

                //Act
                ItemSearchToDecorate baseObject = new ItemSearchToDecorate(context);
                DescriptionContains  toTest     = new DescriptionContains("Gauntlets");
                toTest.setToBeDecorated(baseObject);
                var actual = toTest.GetItems().ToList();

                //Assert
                actual.Should().BeEquivalentTo(expected);
            }
        }