コード例 #1
0
        public void TestSyncingPlPlLanguage()
        {
            var context = new SDInterface(new[] { "-core", "pl-pl" });
            var retVal  = context.Execute();

            Assert.AreEqual(ExecutionResult.Success, retVal);
        }
コード例 #2
0
        public void TestSyncingEditedFile()
        {
            #region Setting the reference file into 'edited' state
            using (SourceDepot store = new SourceDepot(SDIniLocation))
            {
                var cdResults = store.GetChangeList("Test change");
                TestContext.WriteLine("Created changelist: {0}", cdResults);

                TestContext.WriteLine("Editing file...");
                var editResults = store.Edit(FilePattern);
                DumpResults(editResults);

                var context = new SDInterface(new[] { "-core", "pl-pl" });
                var retVal  = context.Execute();
                Assert.AreEqual(ExecutionResult.BadEnlistmentStateFilesOpened, retVal);


                TestContext.WriteLine("Deleting test change list...");
                var revertResults = store.RevertA();
                DumpResults(revertResults);
                var delCdResults = store.DeleteChangeList();
                DumpResults(delCdResults);
            }
            #endregion
        }
コード例 #3
0
        public void TestSyncingNonExistingCheckPointInFrFrStoreLanguage()
        {
            var context = new SDInterface(new[] { "-store", "7229", "fr-fr" });
            var retVal  = context.Execute();

            Assert.AreEqual(ExecutionResult.FailedSyncLabelNotPresent, retVal);
        }
コード例 #4
0
        public void TestSyncingEsEsStoreLanguage()
        {
            var context = new SDInterface(new[] { "-store", "4229", "es-es" });
            var retVal  = context.Execute();

            Assert.AreEqual(ExecutionResult.Success, retVal);
        }
コード例 #5
0
        public void TestInputForCore()
        {
            var context = new SDInterface(new[] { "-core", "4229", "pl-pl" });

            Assert.AreEqual(false, context.ParsedArguments.Correct, "Checkpoint number should be unexpected.");
            Assert.AreEqual("4229", context.ParsedArguments.InvalidArgument);

            context = new SDInterface(new[] { "-core", "pl-pl" });
            Assert.AreEqual(true, context.ParsedArguments.Correct, "This command line for core is correct.");

            context = new SDInterface(new[] { "-store", "pl-pl" });
            Assert.AreEqual(false, context.ParsedArguments.Correct, "Missing checkpoint argument should be detected.");

            context = new SDInterface(new[] { "-store", "4229", "pl-pl" });
            Assert.AreEqual(true, context.ParsedArguments.Correct, "This command line for store is correct.");
        }
コード例 #6
0
 public SDCard(SDInterface sdInterface)
 {
 }
コード例 #7
0
        public void TestShowUsage()
        {
            var context = new SDInterface(new[] { "-store", "7229", "fr-fr" });

            context.ShowUsage();
        }