コード例 #1
0
        public void TestGetRevisionProperty()
        {
            var connector = new SvnConnector();
            connector.Error += connector_Error;
            connector.SetAuthentication("Donald", string.Empty);

            string path = "svn://svn/1";
            RevisionPropertyCollection props = connector.GetRevisionProperties(path, 1);

            Assert.AreEqual(props["svn:author"], "Patrick");
            Assert.AreEqual(props["svn:log"], "Created Trunk");
            Assert.AreEqual(props["svn:date"], "2007-04-13T18:19:11.840126Z");
        }
コード例 #2
0
        public void TestSetRevisionProperty()
        {
            var connector = new SvnConnector();
            connector.Error += connector_Error;
            connector.SetAuthentication("donald", "password");
            string path = "svn://lithium/Test";
            string propname = "v1:Test";
            string propval = DateTime.Now.ToString("u");
            int revision = 1;

            int changedrev = connector.SetRevisionProperty(path, revision, propname, propval);
            Assert.AreEqual(revision, changedrev);
            RevisionPropertyCollection props = connector.GetRevisionProperties(path, revision);
            Assert.AreEqual(props[propname], propval);
        }