public void AllConverterReturnsCorrectName()
        {
            // Arrange
            List <string> filesList = new List <string>()
            {
                "C:\\asd.txt", "C:\\Folder\\qwe.cpp"
            };
            List <string> expectedList = new List <string> {
                "asd.txt", "Folder\\qwe.cpp"
            };
            string path = "c:\\";

            AllConverter  convert    = new AllConverter();
            List <string> actualList = new List <string>();

            // Act
            actualList = convert.ConvertList(filesList, path);

            // Assert
            Assert.AreEqual(expectedList, actualList);
        }
Beispiel #2
0
        public IConverter GetConverter(string name)
        {
            IConverter converter = null;

            switch (name.ToLower())
            {
            case "base":
                converter = new Converter();
                break;

            case "all":
                converter = new AllConverter();
                break;

            default:
                converter = new Converter();
                break;
            }

            return(converter);
        }