public void ImportFromWebsite() { DeckFileResourceHelpers.VerifyURL( "http://ccgdecks.com/deck_view.php?id=614809", new List <ExpectedDeckSection>() { new ExpectedDeckSection("Main") { TotalCardCount = 42, UniqueCardCount = 32 }, new ExpectedDeckSection("Sideboard") { TotalCardCount = 3, UniqueCardCount = 3 }, new ExpectedDeckSection("Command Zone") { TotalCardCount = 0, UniqueCardCount = 0 }, new ExpectedDeckSection("Planes/Schemes") { TotalCardCount = 0, UniqueCardCount = 0 }, }, MTGBase.mtgGame); }
public void ImportOfficiallySubmittedDeckFromWebsite() { DeckFileResourceHelpers.VerifyURL( "http://www.cardgamedb.com/index.php/thelordoftherings/the-lord-of-the-rings-decks/_/lord-of-the-rings-submitted-decks/mono-spirit-r25", new List <ExpectedDeckSection>() { new ExpectedDeckSection("Hero") { TotalCardCount = 3, UniqueCardCount = 3 }, new ExpectedDeckSection("Ally") { TotalCardCount = 24, UniqueCardCount = 11 }, new ExpectedDeckSection("Attachment") { TotalCardCount = 9, UniqueCardCount = 5 }, new ExpectedDeckSection("Event") { TotalCardCount = 17, UniqueCardCount = 9 }, }, LoTRBase.lotrGame); }
public void ImportPersonalDeckFromWebsite() { DeckFileResourceHelpers.VerifyURL( "http://www.cardgamedb.com/index.php/thelordoftherings/the-lord-of-the-rings-deck-share?p=4226&deck=lotrdeck_53bf7c75f0309", new List <ExpectedDeckSection>() { new ExpectedDeckSection("Hero") { TotalCardCount = 3, UniqueCardCount = 3 }, new ExpectedDeckSection("Ally") { TotalCardCount = 8, UniqueCardCount = 3 }, new ExpectedDeckSection("Attachment") { TotalCardCount = 21, UniqueCardCount = 8 }, new ExpectedDeckSection("Event") { TotalCardCount = 21, UniqueCardCount = 7 }, }, LoTRBase.lotrGame); }
public void ImportFromWebsite() { DeckFileResourceHelpers.VerifyURL( "http://www.decklists.net/index.php?option=com_ohmydeckdb&controller=deck&view=deck&deckId=14813", new List <ExpectedDeckSection>() { new ExpectedDeckSection("Main") { TotalCardCount = 60, UniqueCardCount = 19 }, new ExpectedDeckSection("Sideboard") { TotalCardCount = 15, UniqueCardCount = 7 }, new ExpectedDeckSection("Command Zone") { TotalCardCount = 0, UniqueCardCount = 0 }, new ExpectedDeckSection("Planes/Schemes") { TotalCardCount = 0, UniqueCardCount = 0 }, }, MTGBase.mtgGame); }
public void ImportFromWebsite() { DeckFileResourceHelpers.VerifyURL( "http://magic.tcgplayer.com/db/deck.asp?deck_id=1048475", new List <ExpectedDeckSection>() { new ExpectedDeckSection("Main") { TotalCardCount = 60, UniqueCardCount = 19 }, new ExpectedDeckSection("Sideboard") { TotalCardCount = 15, UniqueCardCount = 10 }, new ExpectedDeckSection("Command Zone") { TotalCardCount = 0, UniqueCardCount = 0 }, new ExpectedDeckSection("Planes/Schemes") { TotalCardCount = 0, UniqueCardCount = 0 }, }, MTGBase.mtgGame); }
/// <summary> /// Parses and verifies the card count of the deck filename. The filename must match /// those found in /DeckFiles/ /// </summary> /// <param name="deckFileName">The filename of the deck to verify</param> /// <param name="scratchDirectory">The directory to create the deck file in</param> /// <param name="game">The Game that should be chosen in the Wizard</param> public static void VerifyDeckFile( string deckFileName, IEnumerable <ExpectedDeckSection> expectedSectionsStats, string scratchDirectory, Octgn.DataNew.Entities.Game game) { Assert.IsTrue(DeckFileResourceHelpers.CopyDeckFileResourceToDirectory( scratchDirectory, deckFileName)); ConverterDeck converterDeck = ConvertDeckFileUsingWizard(Path.Combine(scratchDirectory, deckFileName), game); foreach (ConverterSection converterSection in converterDeck.ConverterSections) { ExpectedDeckSection expectedSectionStats = expectedSectionsStats.First(eds => eds.SectionName == converterSection.SectionName); Assert.AreEqual(expectedSectionStats.TotalCardCount, converterSection.SectionCount); Assert.AreEqual(expectedSectionStats.UniqueCardCount, converterSection.SectionMappings.Count(sm => sm.PotentialOCTGNCards.Count > 0)); foreach (ConverterMapping converterMapping in converterSection.SectionMappings) { // At least one potential match should have been found Assert.IsTrue(converterMapping.PotentialOCTGNCards.Count() > 0); } } }
public void ImportFromWebsite() { DeckFileResourceHelpers.VerifyURL( "http://www.mtgvault.com/az88/decks/standard-azorius-control-m15/", new List <ExpectedDeckSection>() { new ExpectedDeckSection("Main") { TotalCardCount = 60, UniqueCardCount = 20 }, new ExpectedDeckSection("Sideboard") { TotalCardCount = 15, UniqueCardCount = 9 }, new ExpectedDeckSection("Command Zone") { TotalCardCount = 0, UniqueCardCount = 0 }, new ExpectedDeckSection("Planes/Schemes") { TotalCardCount = 0, UniqueCardCount = 0 }, }, MTGBase.mtgGame); }
public void ImportFromWebsite() { DeckFileResourceHelpers.VerifyURL( "http://mtgtop8.com/event?e=7937&d=245652&f=MO", new List <ExpectedDeckSection>() { new ExpectedDeckSection("Main") { TotalCardCount = 60, UniqueCardCount = 27 }, new ExpectedDeckSection("Sideboard") { TotalCardCount = 15, UniqueCardCount = 10 }, new ExpectedDeckSection("Command Zone") { TotalCardCount = 0, UniqueCardCount = 0 }, new ExpectedDeckSection("Planes/Schemes") { TotalCardCount = 0, UniqueCardCount = 0 }, }, MTGBase.mtgGame); }
public void ImportFromWebsite() { DeckFileResourceHelpers.VerifyURL( "http://www.mtgdecks.net/decks/view/38600", new List <ExpectedDeckSection>() { new ExpectedDeckSection("Main") { TotalCardCount = 60, UniqueCardCount = 19 }, new ExpectedDeckSection("Sideboard") { TotalCardCount = 15, UniqueCardCount = 7 }, new ExpectedDeckSection("Command Zone") { TotalCardCount = 0, UniqueCardCount = 0 }, new ExpectedDeckSection("Planes/Schemes") { TotalCardCount = 0, UniqueCardCount = 0 }, }, MTGBase.mtgGame); }
public void ImportFromWebsite() { DeckFileResourceHelpers.VerifyURL( "http://www.essentialmagic.com/Decks/View.asp?ID=950025", new List <ExpectedDeckSection>() { new ExpectedDeckSection("Main") { TotalCardCount = 60, UniqueCardCount = 17 }, new ExpectedDeckSection("Sideboard") { TotalCardCount = 2, UniqueCardCount = 2 }, new ExpectedDeckSection("Command Zone") { TotalCardCount = 0, UniqueCardCount = 0 }, new ExpectedDeckSection("Planes/Schemes") { TotalCardCount = 0, UniqueCardCount = 0 }, }, MTGBase.mtgGame); }
/// <summary> /// Parses and verifies the card count of each of the deck filenames. These filenames must match /// those found in /DeckFiles/ /// </summary> /// <param name="deckFileNames">Collection of deck filenames to verify</param> private void VerifyMTGDeckFiles(IEnumerable <string> deckFileNames) { foreach (string deckFileName in deckFileNames) { DeckFileResourceHelpers.VerifyDeckFile( deckFileName, MW.ExpectedCardCounts[deckFileName], this.TestContext.DeploymentDirectory, MW.mwGame); } }
private void CompareIdenticalDecksInDifferentFormats(IEnumerable <string> deckNameGroup) { List <OCTGNDeckConverter.Model.ConverterDeck> converterDeckGroup = new List <OCTGNDeckConverter.Model.ConverterDeck>(); foreach (string deckName in deckNameGroup) { DeckFileResourceHelpers.CopyDeckFileResourceToDirectory(this.TestContext.DeploymentDirectory, deckName); converterDeckGroup.Add(DeckFileResourceHelpers.ConvertDeckFileUsingWizard( Path.Combine(this.TestContext.DeploymentDirectory, deckName), MTG.mtgGame)); } DeckFileResourceHelpers.VerifyAllConverterDecksAreIdentical(converterDeckGroup); }
public void ImportFromWebsite() { DeckFileResourceHelpers.VerifyURL( "http://tappedout.net/mtg-decks/dimir-killing-mill/", new List <ExpectedDeckSection>() { new ExpectedDeckSection("Main") { TotalCardCount = 60, UniqueCardCount = 18 }, new ExpectedDeckSection("Sideboard") { TotalCardCount = 15, UniqueCardCount = 6 }, new ExpectedDeckSection("Command Zone") { TotalCardCount = 0, UniqueCardCount = 0 }, new ExpectedDeckSection("Planes/Schemes") { TotalCardCount = 0, UniqueCardCount = 0 }, }, MTGBase.mtgGame); DeckFileResourceHelpers.VerifyURL( "http://tappedout.net/mtg-decks/rise-of-the-undead-shrubbery/", new List <ExpectedDeckSection>() { new ExpectedDeckSection("Main") { TotalCardCount = 100, UniqueCardCount = 87 }, new ExpectedDeckSection("Sideboard") { TotalCardCount = 0, UniqueCardCount = 0 }, new ExpectedDeckSection("Command Zone") { TotalCardCount = 0, UniqueCardCount = 0 }, new ExpectedDeckSection("Planes/Schemes") { TotalCardCount = 0, UniqueCardCount = 0 }, }, MTGBase.mtgGame); }
public void ImportFromWebsite() { DeckFileResourceHelpers.VerifyURL( "http://forum.arcanewonders.com/index.php?topic=14509.0", new List <ExpectedDeckSection>() { new ExpectedDeckSection("Mage") { TotalCardCount = 2, UniqueCardCount = 2 }, new ExpectedDeckSection("Attack") { TotalCardCount = 3, UniqueCardCount = 2 }, new ExpectedDeckSection("Conjuration") { TotalCardCount = 6, UniqueCardCount = 5 }, new ExpectedDeckSection("Creature") { TotalCardCount = 1, UniqueCardCount = 1 }, new ExpectedDeckSection("Enchantment") { TotalCardCount = 41, UniqueCardCount = 25 }, new ExpectedDeckSection("Equipment") { TotalCardCount = 4, UniqueCardCount = 4 }, new ExpectedDeckSection("Incantation") { TotalCardCount = 8, UniqueCardCount = 4 }, }, MWBase.mwGame); }