public void BaseStockConstructorTest1() { string name = baseStockTestName; string absolutePath = appDataPath; BaseStock_Accessor target = new BaseStock_Accessor(name, absolutePath); Assert.IsTrue(Directory.Exists(appDataPath + "\\" + baseStockTestName), "OOPS! Stock directory does not exist."); }
public void isFilenameAllowedTest1() { string name = "some slash name/.txt"; bool expected = false; bool actual; actual = BaseStock_Accessor.isFilenameAllowed(name); Assert.AreEqual(expected, actual, "BAD! Name \"" + name + "\" is allowed."); }
public void isFilenameAllowedTest() { string name = "Just a common name1.txt"; bool expected = true; bool actual; actual = BaseStock_Accessor.isFilenameAllowed(name); Assert.AreEqual(expected, actual, "BAD! Name \"" + name + "\" is disallowed."); }
public void isStockReusedTest1() { string name = baseStockTestName; BaseStock stock = new BaseStock(name); PrivateObject param0 = new PrivateObject(stock); BaseStock_Accessor target = new BaseStock_Accessor(param0); bool expected = false; bool actual; target.isStockReused = expected; actual = target.isStockReused; Assert.AreEqual(expected, actual, "OH NO! Not reused stock is marked as reused."); }
public void isRemovedTest() { string name = baseStockTestName; BaseStock stock = new BaseStock(name); stock.DeleteStock(); PrivateObject param0 = new PrivateObject(stock); BaseStock_Accessor target = new BaseStock_Accessor(param0); bool expected = true; bool actual; target.isRemoved = expected; actual = target.isRemoved; Assert.AreEqual(expected, actual, "EWW! Removed object is not marked as removed."); }