public void CopyItem() { var name = Guid.NewGuid().ToString(); var template = itemVerifier.CreateRandomTemplate(name); template.ItemType = Guid.NewGuid().ToString(); template.Magic.SpecialAbilities = new[] { new SpecialAbility { Name = Guid.NewGuid().ToString() }, new SpecialAbility { Name = Guid.NewGuid().ToString() } }; template.Attributes = new[] { Guid.NewGuid().ToString(), Guid.NewGuid().ToString() }; var copy = template.Copy(); itemVerifier.AssertMagicalItemFromTemplate(copy, template); Assert.That(copy.ItemType, Is.EqualTo(template.ItemType)); Assert.That(copy.Magic.SpecialAbilities, Is.Empty); Assert.That(copy.Attributes, Is.EquivalentTo(template.Attributes)); }
public void TemplateIsSpecific() { var name = Guid.NewGuid().ToString(); var template = itemVerifier.CreateRandomTemplate(name); var specificItems = new[] { "other item", name }; mockCollectionsSelector.Setup(s => s.SelectFrom(TableNameConstants.Collections.Set.ItemGroups, AttributeConstants.Specific)).Returns(specificItems); var isSpecific = specificGearGenerator.TemplateIsSpecific(template); Assert.That(isSpecific, Is.True); }