public void IsTrueIfIdExistInTcnList() { var testTcn = new TcnDto(); testTcn.Id = 4001; testTcn.Tcn = 134120065003400; var tcnsFromTxtFile = new TcnsFromTxtFile(path); var tcnList = new List <TcnDto>(tcnsFromTxtFile.GenerateList()); Assert.IsTrue(tcnList.Exists(t => t.Id == testTcn.Id)); }
public void IsFalseIfMaxTcnDosentExistInMinTcnList() { var tcnsFromTxtFile = new TcnsFromTxtFile(path); var BaseTcnList = new List <TcnDto>(tcnsFromTxtFile.GenerateList()); var tcnsByMinMode = new TcnsByMinMode(); var MinTcnList = new List <TcnDto>(tcnsByMinMode.ProcessList(BaseTcnList)); var result = MinTcnList.Contains(BaseTcnList[5]); Console.WriteLine(); Assert.IsFalse(result); }
static void Main(string[] args)//// TODO: Create a full Windows Form for UX { Console.WriteLine("*** Welconme to TCN List APP ***"); Console.WriteLine("Press Enter to choose a file to process"); Console.ReadKey(); var path = ChooseFile(); var tcnsFromTxtFile = new TcnsFromTxtFile(path); var list = new List <TcnDto>(tcnsFromTxtFile.GenerateList()); var tcnsByMaxMode = new TcnsByMaxMode(); var tcnsByMinMode = new TcnsByMinMode(); var MaxTcnList = new List <TcnDto>(tcnsByMaxMode.ProcessList(list)); var MinTcnList = new List <TcnDto>(tcnsByMinMode.ProcessList(list)); ShowList(list, "***Original List ****\n"); ShowList(MaxTcnList, "\n***List of tcn with max value****\n"); ShowList(MinTcnList, "\n***List of tcn with min value****\n"); Console.ReadKey(); }