Esempio n. 1
0
        public void IsFileAccepted_Test()
        {
            _MockAppConfig.Setup(x => x.AcceptedFiles).Returns(".csv,.xlsx");

            GenericHelpers genericHelper = new GenericHelpers();

            Assert.IsTrue(genericHelper.IsFileAccepted(_MockAppConfig.Object, ".csv"));
            Assert.IsTrue(genericHelper.IsFileAccepted(_MockAppConfig.Object, ".xlsx"));
            Assert.IsFalse(genericHelper.IsFileAccepted(_MockAppConfig.Object, ".jpg"));
            Assert.IsFalse(genericHelper.IsFileAccepted(_MockAppConfig.Object, ".txt"));
            Assert.IsFalse(genericHelper.IsFileAccepted(_MockAppConfig.Object, ".png"));
        }