コード例 #1
0
        public void TestIsFileCompressable()
        {
            var testMainWindowPresenter = new MainWindowPresenter();

            string check    = "Tesssttt.jpg";
            bool   expected = true;

            Assert.AreEqual(expected, testMainWindowPresenter.IsFileCompressable(check));
            check    = ".jpg";
            expected = true;
            Assert.AreEqual(expected, testMainWindowPresenter.IsFileCompressable(check));
            check    = ".sys";
            expected = false;
            Assert.AreEqual(expected, testMainWindowPresenter.IsFileCompressable(check));
            check    = "someUnknownFile";
            expected = false;
            Assert.AreEqual(expected, testMainWindowPresenter.IsFileCompressable(check));
            check    = "";
            expected = false;
            Assert.AreEqual(expected, testMainWindowPresenter.IsFileCompressable(check));
        }