Esempio n. 1
0
        public void Test_ContainsJapaneseCharacters(string description, bool expectedValue)
        {
            Game game = new Game()
            {
                Description = description
            };

            DescriptionUpdater descriptionUpdater = new DescriptionUpdater();
            bool actualValue = descriptionUpdater.ContainsJapaneseCharacters(game);

            Assert.Equal(expectedValue, actualValue);
        }
Esempio n. 2
0
        public void Test_ReplaceUnrenderableCharacterReferences(string description, char oldChar, char newChar, string expectedValue)
        {
            Game game = new Game()
            {
                Description = description
            };

            DescriptionUpdater descriptionUpdater = new DescriptionUpdater();

            descriptionUpdater.ReplaceUnrenderableCharacterReferences(game, oldChar, newChar);
            string actualValue = game.Description;

            Assert.Equal(expectedValue, actualValue);
        }
Esempio n. 3
0
        public void Test_RemoveArcadeHistoryFooter_RemovesFooter()
        {
            Game game = new Game()
            {
                Description = "Game (C) 1992 Game Company\n\nDescription\n\n(C) arcade-history.com"
            };

            DescriptionUpdater descriptionUpdater = new DescriptionUpdater();

            descriptionUpdater.RemoveArcadeHistoryFooter(game);
            string actualValue   = game.Description;
            string expectedValue = "Game (C) 1992 Game Company\n\nDescription";

            Assert.Equal(expectedValue, actualValue);
        }
Esempio n. 4
0
        public void Test_RemoveArcadeHistoryHeader_DoesNotRemoveHeaderLikeTextInBody()
        {
            Game game = new Game()
            {
                Description = "Game (C) 1992 Game Company\n\nDescription. Game (C) 1992 Game Company\n\n(C) arcade-history.com"
            };

            DescriptionUpdater descriptionUpdater = new DescriptionUpdater();

            descriptionUpdater.RemoveArcadeHistoryHeader(game);
            string actualValue   = game.Description;
            string expectedValue = "Description. Game (C) 1992 Game Company\n\n(C) arcade-history.com";

            Assert.Equal(expectedValue, actualValue);
        }
        public void RunDescriptionsUpdater()
        {
            _inputRecords = new List <DDRecord>();
            OpenFileDialog openFileDialog = new OpenFileDialog();

            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                _recordsWithUpdates = excelFileHelper.ReadLines(openFileDialog.FileName);
            }
            _descriptionUpdater = new DescriptionUpdater(_inputRecords, _resultDescriptions);
            _descriptionUpdater.UpdateBusinessDescriptionAndFieldBehaviours(_recordsWithUpdates);
            _resultDescriptions.AddRange(_inputRecords);
            _resultDescriptions = _resultDescriptions.OrderBy(el => el.ContextName).ThenBy(el => el.DataKey).ToList();
            SaveFileDialog saveFileDialog = new SaveFileDialog();

            if (saveFileDialog.ShowDialog() == DialogResult.OK)
            {
                txtFileWriter.WriteToFile(saveFileDialog.FileName + ".txt", _resultDescriptions);
            }
        }
Esempio n. 6
0
 public FlorineSkiaOptionSet()
 {
     UpdaterHook = new DescriptionUpdater(this);
 }