Beispiel #1
0
        public void TestPendingStatus()
        {
            TfsTask task = CreateTfsTaskFromLocalProjectPath(TFSServerAddress, this.testProjectPath);

            Workspace.PendEdit(new[] { mainScenePath }, RecursionType.None, null, LockLevel.Checkin);

            VersionedAssetList result = new VersionedAssetList();

            task.GetStatus(new VersionedAssetList {
                new VersionedAsset(mainScenePath.Replace("\\", "/"))
            }, result, true, true);
            Assert.AreEqual(true, result[0].HasState(State.kCheckedOutLocal));

            var newFile = Path.Combine(this.testProjectPath, "assets", "new.txt");

            File.WriteAllText(newFile, "hi");
            Workspace.PendAdd(newFile);

            result = new VersionedAssetList();
            task.GetStatus(new VersionedAssetList {
                new VersionedAsset(newFile.Replace("\\", "/"))
            }, result, true, true);
            Assert.AreEqual(true, result[0].HasState(State.kAddedLocal));
        }
Beispiel #2
0
        public void TestStatus2()
        {
            TfsTask task = CreateTfsTaskFromLocalProjectPath(TFSServerAddress, this.testProjectPath);
            var     w    = new Stopwatch();

            w.Start();
            var s = task.GetStatus();

            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            task.GetStatus();
            var time = w.ElapsedMilliseconds;

            Assert.IsTrue(time < 10000);
        }
Beispiel #3
0
        public void TestStatus()
        {
            TfsTask task = CreateTfsTaskFromLocalProjectPath(TFSServerAddress, this.testProjectPath);

            var s = task.GetStatus();
        }