예제 #1
0
        public void ReadEmptyRevision()
        {
            var xml       = @".\SVN_Logs_Examples\csprojeditorLog.xml";
            var reader    = new SVNReader(133);
            var svnPoints = reader.Read(xml);

            Assert.AreEqual(0, svnPoints.Count);
        }
예제 #2
0
        public void ReadValidRevision()
        {
            var xml       = @".\SVN_Logs_Examples\csprojeditorLog.xml";
            var reader    = new SVNReader(132);
            var svnPoints = reader.Read(xml)[0];

            Assert.AreEqual(4, ((SVNModel)svnPoints.ExtensionPoint["SVNExtension"]).Modified);
            Assert.AreEqual(0, ((SVNModel)svnPoints.ExtensionPoint["SVNExtension"]).Add);
            Assert.AreEqual(0, ((SVNModel)svnPoints.ExtensionPoint["SVNExtension"]).Deleted);
        }
예제 #3
0
        public void ReadSimpleLog()
        {
            var xml       = @".\SVN_Logs_Examples\SimpleLog.xml";
            var reader    = new SVNReader(0);
            var svnPoints = reader.Read(xml)[0];

            Assert.AreEqual(2, ((SVNModel)svnPoints.ExtensionPoint["SVNExtension"]).Modified);
            Assert.AreEqual(0, ((SVNModel)svnPoints.ExtensionPoint["SVNExtension"]).Add);
            Assert.AreEqual(0, ((SVNModel)svnPoints.ExtensionPoint["SVNExtension"]).Deleted);
        }
 public void TestUserName()
 {
     string xml = @"SVN_Logs_Examples\SimpleLog.xml";
     var p = new SVNPlugin();
     var reader = new SVNReader(0);
     var users = reader.Read(xml);
     Assert.AreEqual(1, users.Count);
     foreach (var user in users)
     {
         Assert.AreEqual("hbsis.leonardo.kobus", user.Name);
    }                     
 }        
예제 #5
0
        public void VariousModels()
        {
            var xml       = @".\SVN_Logs_Examples\csprojeditorLog.xml";
            var reader    = new SVNReader(0);
            var svnPoints = reader.Read(xml);
            var buttler   = svnPoints.First(p => p.Name.Equals("jenkins.the.buttler"));

            Assert.AreEqual(0, ((SVNModel)buttler.ExtensionPoint["SVNExtension"]).Add);
            Assert.AreEqual(0, ((SVNModel)buttler.ExtensionPoint["SVNExtension"]).Modified);
            Assert.AreEqual(1, ((SVNModel)buttler.ExtensionPoint["SVNExtension"]).Deleted);
            Assert.AreEqual("jenkins.the.buttler", buttler.Name);
        }
        public void TestUserName()
        {
            string xml    = @"SVN_Logs_Examples\SimpleLog.xml";
            var    p      = new SVNPlugin();
            var    reader = new SVNReader(0);
            var    users  = reader.Read(xml);

            Assert.AreEqual(1, users.Count);
            foreach (var user in users)
            {
                Assert.AreEqual("hbsis.leonardo.kobus", user.Name);
            }
        }
예제 #7
0
        public void GetReposByOneRevisionAhed()
        {
            var url            = @"file:///C:/users/leonardo.kobus/desktop/games/gamification/SVNExtension.UnitTest/bin/Debug/RepositorioNET";
            int initialRelease = 2;

            using (var manager = new SVNManager())
            {
                var reader = new SVNReader(initialRelease);
                manager.Generate(url, initialRelease);

                foreach (var file in manager.Files)
                {
                    var users = reader.Read(file);
                    Assert.AreEqual(0, users.Count);
                }
            }
        }
예제 #8
0
        public void GetRepostLogByRevisionTest()
        {
            var url            = @"file:///C:/users/leonardo.kobus/desktop/games/gamification/SVNExtension.UnitTest/bin/Debug/RepositorioNET";
            int initialRelease = 0;

            using (var manager = new SVNManager())
            {
                manager.Generate(url, initialRelease);
                var reader = new SVNReader(initialRelease);
                foreach (var file in manager.Files)
                {
                    var users = reader.Read(file);
                    Assert.AreEqual(1, users.Count);

                    foreach (var user in users)
                    {
                        Assert.AreEqual(10, ((SVNModel)user.ExtensionPoint["SVNExtension"]).Add);
                        Assert.AreEqual(2, reader.CurrentRevision);
                        Assert.AreEqual(0, ((SVNModel)user.ExtensionPoint["SVNExtension"]).Deleted);
                        Assert.AreEqual(0, ((SVNModel)user.ExtensionPoint["SVNExtension"]).Modified);
                    }
                }
            }
        }
예제 #9
0
        public void ReadNullLog()
        {
            var reader = new SVNReader(0);

            reader.Read(null);
        }