public void Should_Return_The_Full_Path() { // Given, When var path = new TestPath("temp/hello"); // Then Assert.AreEqual("temp/hello", path.ToString()); }
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()); }
public void ShouldReturnStringRepresentation(string path, string expected) { // Given, When TestPath testPath = new TestPath(path); // Then testPath.ToString().ShouldBe(expected); }
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); }
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); }
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()); }