Example #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.");
        }
Example #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.");
        }
Example #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.");
        }
Example #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.");
        }
Example #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.");
        }
Example #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.");
        }
Example #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.");
        }
Example #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.");
        }