Esempio n. 1
0
            public void Should_Return_The_Full_Path()
            {
                // Given, When
                var path = new TestPath("temp/hello");

                // Then
                Assert.AreEqual("temp/hello", path.ToString());
            }
Esempio n. 2
0
            public void ShouldReturnStringRepresentation(string provider, string path, string expected)
            {
                // Given, When
                TestPath testPath = new TestPath(provider == null ? null : new Uri(provider), path);

                // Then
                Assert.AreEqual(expected, testPath.ToString());
            }
Esempio n. 3
0
            public void ShouldReturnStringRepresentation(string path, string expected)
            {
                // Given, When
                TestPath testPath = new TestPath(path);

                // Then
                testPath.ToString().ShouldBe(expected);
            }
Esempio n. 4
0
        private bool CheckData()
        {
            bool   kiemtrabaocom = false;
            string fileToRead    = System.IO.Path.GetDirectoryName(Application.StartupPath + @"\CheckCom\");

            DirectoryInfo dinfo = new DirectoryInfo(fileToRead);

            FileInfo[] Files = dinfo.GetFiles("*");
            foreach (FileInfo file in Files)
            {
                var path = new TestPath(file);
                if (path.ToString() == dateTimePicker1.Value.ToString("MM-dd-yyyy") + caan)
                {
                    kiemtrabaocom = true;
                    break;
                }
            }
            return(kiemtrabaocom);
        }
Esempio n. 5
0
        private bool CheckBuaan()
        {
            bool   kiemtrabuaan = false;
            string fileToRead   = System.IO.Path.GetDirectoryName(Application.StartupPath + @"\Buaan\");

            DirectoryInfo dinfo = new DirectoryInfo(fileToRead);

            FileInfo[] Files = dinfo.GetFiles("*");
            foreach (FileInfo file in Files)
            {
                var path = new TestPath(file);
                if (path.ToString() == "BuaAn")
                {
                    kiemtrabuaan = true;
                    break;
                }
            }
            return(kiemtrabuaan);
        }
Esempio n. 6
0
            public void ShouldReturnStringRepresentation(string provider, string path, string expected)
            {
                // Given, When
                TestPath testPath = new TestPath(provider == null ? null : new Uri(provider), path);

                // Then
                Assert.AreEqual(expected, testPath.ToString());
            }