public void checkPort_II() { string[] getFileData = PortfolioStock.getStockFile(@"C:\Users\vinothkanth\Desktop\PortFolioData.txt"); string[] getSingleLine = PortfolioStock.fetchSingleLine(getFileData); double[] getStockValue = PortfolioStock.splitFileData(getSingleLine); double[] stockValue = new double[] { 18500, 6000, 2000 }; Assert.AreNotEqual(stockValue, getStockValue); }
public void checkPortResult() { string[] getFileData = PortfolioStock.getStockFile(@"C:\Users\vinothkanth\Desktop\PortFolioData.txt"); string[] getSingleLine = PortfolioStock.fetchSingleLine(getFileData); double[] getStockValue = PortfolioStock.splitFileData(getSingleLine); double[] stockValue = new double[3]; stockValue[0] = 3000.0; stockValue[1] = 8000.0; stockValue[2] = 13500.0; CollectionAssert.AreEqual(stockValue, getStockValue); }
public void AutoTellTest() { try { PortfolioStock.getStockFile(@"C:\Users\vinothkanth\Desktop\PortFolioData.txt"); } catch (System.IO.FileNotFoundException e) { StringAssert.Contains(e.Message, "File Not Found Exception"); return; } catch (Exception e) { StringAssert.Contains(e.Message, "File Not Found Exception"); return; } Assert.Fail("No Exception was through"); }
public void UnknownFile() { string[] stockData = PortfolioStock.getStockFile(@"C:\Users\vinothkanth\Desktop\Por"); string[] checkData = new string[] {}; CollectionAssert.AreEqual(checkData, stockData); }
public void FileNotEmpty() { string[] stockData = PortfolioStock.getStockFile(@"C:\Users\vinothkanth\Desktop\PortFolioData.txt"); string[] checkData = new string[] { }; CollectionAssert.AreNotEqual(checkData, stockData); }