EndsWith() статический публичный Метод

Asserts that a string ends with another string.
static public EndsWith ( string expected, string actual ) : void
expected string The expected string
actual string The string to be examined
Результат void
Пример #1
0
        public void Test_Worker_Pkg()
        {
            var sut = new PackageUpdaterWorker();
            var executablePackage = sut.GetExecutablePackage(new FileInfo(Path.Combine(this.Update11Folder.FullName, "MyPackageBasedApp Update v. 1.1.pkg")));

            StringAssert.EndsWith(@"\PackagedApp\Updates\1.1\MyPackageBasedApp Update v. 1.1.pkg", executablePackage.FullName);
            Assert.IsTrue(executablePackage.Exists);
        }
Пример #2
0
        public void Test_Worker_ZippedPkg()
        {
            //package which is donwloaded needs to be extracted, hence the expected executable package is in _Extracted folder
            var sut = new PackageUpdaterWorker();
            var executablePackage = sut.GetExecutablePackage(new FileInfo(Path.Combine(this.Update12Folder.FullName, "1.2", "MyPackageBasedApp Update v. 1.2.zip")));

            Assert.IsTrue(executablePackage.Exists);
            StringAssert.EndsWith(@"\PackagedApp\Updates\1.2\1.2 Extracted\UpdatePackage.pkg", executablePackage.FullName);
        }