Exemplo n.º 1
0
        public void TestMethod1()
        {
            //path do refaktoryzacji
            var path = @"..\..\Bytom\Coffee13\Transfers.xml";

            var test = new CoffeeFileOperation();

            Assert.AreEqual(test.GetFileContent(path), "Dane testowe");
        }
Exemplo n.º 2
0
        public void TestMethod1()
        {
            //path do refaktoryzacji
            var path = @"..\..\Bytom\Coffee13\Transfers.xml";


            var test = new CoffeeFileOperation();

            Assert.AreEqual(test.GetFileContent(path), "Dane testowe");
        }
Exemplo n.º 3
0
        // wczytac plik do stringu
        // rozbic string na linie
        // linie przetworzyc GetTransferEntry na typ BankTransfer
        public override List <BankTransfer> GetBankTransfers()
        {
            var transfer = new Coffee2BankTransfer();

            var    file      = new CoffeeFileOperation();
            string transfers = file.GetFileContent(@"..\..\Coffee13\TaskTrainingTree\newTransfers.xml"); //path?\

            return(null);

            //foreach iterujący po tablicy CoffeeBankTransferów

            GetTransferEntry(Coffee2XmlSerialization.SerializeObjectToStringEntry(transfer));
        }
        // wczytac plik do stringu
        // rozbic string na linie
        // linie przetworzyc GetTransferEntry na typ BankTransfer
        public override List<BankTransfer> GetBankTransfers()
        {
            var transfer = new Coffee2BankTransfer();

            var file = new CoffeeFileOperation();
            string transfers = file.GetFileContent(@"..\..\Coffee13\TaskTrainingTree\newTransfers.xml"); //path?\

            return null;

            //foreach iterujący po tablicy CoffeeBankTransferów

            GetTransferEntry(Coffee2XmlSerialization.SerializeObjectToStringEntry(transfer));
        }
        // wczytac plik do stringu
        // rozbic string na linie
        // linie przetworzyc GetTransferEntry na typ BankTransfer
        public override List<BankTransfer> GetBankTransfers()
        {
            List<string> stringsSerparatedFromMainContent = new List<string>();
            List<BankTransfer> listOfBankTransfers = new List<BankTransfer>();

            var file = new CoffeeFileOperation();
            string mainContent = file.GetFileContent(@"..\..\Coffee13\TaskTrainingTree\newTransfers.xml"); //path?\

            stringsSerparatedFromMainContent = CoffeeDeserialization.SplitMainStringtoTransferStrings(mainContent);

            foreach (var entry in stringsSerparatedFromMainContent)
            {
                listOfBankTransfers.Add(GetTransferEntry(entry));
            }

            return listOfBankTransfers;
        }
        // wczytac plik do stringu
        // rozbic string na linie
        // linie przetworzyc GetTransferEntry na typ BankTransfer
        public override List <BankTransfer> GetBankTransfers()
        {
            List <string>       stringsSerparatedFromMainContent = new List <string>();
            List <BankTransfer> listOfBankTransfers = new List <BankTransfer>();

            var    file        = new CoffeeFileOperation();
            string mainContent = file.GetFileContent(@"..\..\Coffee13\TaskTrainingTree\newTransfers.xml"); //path?\

            stringsSerparatedFromMainContent = CoffeeDeserialization.SplitMainStringtoTransferStrings(mainContent);

            foreach (var entry in stringsSerparatedFromMainContent)
            {
                listOfBankTransfers.Add(GetTransferEntry(entry));
            }


            return(listOfBankTransfers);
        }