Пример #1
0
        public void SetUp()
        {
            testReader = new PokemonReader();
            pokedex_sourceExample_XML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
                                        "<Pokedex>\n" +
                                        "<Pokemons>\n" +
                                        "<Pokemon>\n" +
                                        "<Index>1</Index>\n" +
                                        "<Name>Bulbasaur</Name>\n" +
                                        "<Type1>Grass</Type1>\n" +
                                        "<Type2>Poison</Type2>\n" +
                                        "<HP>128</HP>\n" +
                                        "<Attack>118</Attack>\n" +
                                        "<Defense>111</Defense>\n" +
                                        "<MaxCP>1115</MaxCP>\n" +
                                        "</Pokemon>\n" +
                                        "</Pokemons>\n" +
                                        "</Pokedex>";

            pokemonBag_sourceExample_XML = "<?xml version=\"1.0\"?>\n" +
                                           "<PokemonBag>\n" +
                                           "<Pokemons>\n" +
                                           "<int>151</int>\n" +
                                           "<int>149</int>\n" +
                                           "</Pokemons>\n" +
                                           "</PokemonBag>";

            string now = DateTime.Now.ToString("MMddyyyyhmm");
            string dir = System.AppContext.BaseDirectory;

            path = dir + now;
        }
Пример #2
0
        public void Init()
        {
            saver  = new PokemonSaver();
            reader = new PokemonReader();

            string now = DateTime.Now.ToString("MMddyyyyhmm");
            string dir = System.AppContext.BaseDirectory;

            path = dir + now;
        }
Пример #3
0
 public void Init()
 {
     reader   = new PokemonReader();
     fileName = Path.Combine(System.AppContext.BaseDirectory, "pokemon151.xml");
 }