public void Build_WithUnknownManaSymbol_ShouldThrow() { var imageMapper = Mock.Of <IManaSymbolImageMap>(); var factory = new ManaSymbolFactory(imageMapper); Assert.Throws <ManaSymbolFactoryException>(() => factory.Build("Unknown")); }
public void Build_WithValidSymbol_ShouldValidManaSymbol(string manaSymbol, ManaSymbolType type) { const string imageName = "ImageName.jpg"; var imageMapper = Mock.Of <IManaSymbolImageMap>(m => m.GetValue(manaSymbol) == imageName); var factory = new ManaSymbolFactory(imageMapper); var result = factory.Build(manaSymbol); result.ImageName.ShouldBe(imageName); result.Type.ShouldBe(type); }