Пример #1
0
        public void Leer_un_fichero_vacio()
        {
            FileReader reader = new FileReader("empty.txt");

            List<string> expected = new List<string>();

            List<string> list = reader.Load();

            AssertDic(0, list, expected);
        }
Пример #2
0
        public void Leer_un_fichero_que_no_existe()
        {
            FileReader reader = new FileReader("notfound.txt");

            List<string> expected = new List<string>();

            List<string> list = reader.Load();

            AssertDic(0, list, expected);
        }
Пример #3
0
        public void Leer_un_fichero_con_caracteres_no_validos()
        {
            FileReader reader = new FileReader("otherChars.txt");

            List<string> expected = new List<string>(){"presente"};

            List<string> list = reader.Load();

            AssertDic(1, list, expected);
        }
Пример #4
0
        public void Leer_un_fichero()
        {
            FileReader reader = new FileReader("test.txt");

            List<string> expected = this.GetDictionary();

            List<string> list = reader.Load();

            AssertDic(3, list, expected);
        }
Пример #5
0
 public void Inicializar_la_clase_FileReader_con_valor_null()
 {
     try
     {
         FileReader reader = new FileReader(null);
     }
     catch (Exception ex)
     {
         Assert.IsInstanceOfType(ex, typeof(ArgumentNullException));
     }
 }
Пример #6
0
        public static List<string> GetDic()
        {
            FileReader reader = new FileReader("dic.txt");

            return reader.Load();
        }