Esempio n. 1
0
        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.");
        }
Esempio n. 2
0
        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.");
        }
Esempio n. 3
0
        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.");
        }
Esempio n. 4
0
        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.");
        }
Esempio n. 5
0
        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.");
        }
Esempio n. 6
0
        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.");
        }
Esempio n. 7
0
        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.");
        }
Esempio n. 8
0
        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.");
        }