Пример #1
0
        public void SetNewPathTest()
        {
            SolutionDirectoryPathManagementBaseFixture _newInstance = new SolutionDirectoryPathManagementBaseFixture();

            Assert.IsTrue(String.IsNullOrEmpty(_newInstance.BaseDirectory));
            _newInstance.SetNewPath("NewPath");
            Assert.AreEqual <int>(1, _newInstance.UpdateCounter);
            Assert.AreEqual <string>(String.Empty, _newInstance.oldPath);
            Assert.AreEqual <string>("NewPath", _newInstance.newPath);
        }
        public void SetNewPathTest()
        {
            SolutionDirectoryPathManagementBaseFixture _newInstance = new SolutionDirectoryPathManagementBaseFixture(@"C:\a\c\d\name.ext");

            Assert.AreEqual <string>(@"C:\a\c\d", _newInstance.DefaultDirectory);
            Assert.AreEqual <int>(0, _newInstance.UpdateCounter);
            _newInstance.SetNewPath(@"C:\a\x\y\name.ext");
            Assert.AreEqual <int>(1, _newInstance.UpdateCounter);
            Assert.AreEqual <string>(@"C:\a\c\d", _newInstance.oldPath);
            Assert.AreEqual <string>(@"C:\a\x\y", _newInstance.newPath);
        }