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); }
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); }
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 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 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); } } }
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); } } } }
public void Analyze() { var list = new List <IUser>(); var logs = GetLogs(); List <List <IUser> > results = new List <List <IUser> >(); for (int i = 0; i < logs.Count; i++) { var reader = new SVNReader(Repos[i].CurrentVersion); results.Add(reader.Read(logs[i])); Repos[i].CurrentVersion = reader.CurrentRevision; reader.Infos.ForEach(p => DBUtils.Insert <SVNInfo>(p)); } foreach (var resultRead in results) { foreach (var user in resultRead) { log.InfoFormat("Updating user : {0}", user.Name); UpdateUser(user); } } UpdateReposytorys(); }
public void Analyze() { var list = new List<IUser>(); var logs = GetLogs(); List<List<IUser>> results = new List<List<IUser>>(); for (int i = 0; i < logs.Count; i++) { var reader = new SVNReader(Repos[i].CurrentVersion); results.Add(reader.Read(logs[i])); Repos[i].CurrentVersion = reader.CurrentRevision; reader.Infos.ForEach(p => DBUtils.Insert<SVNInfo>(p)); } foreach (var resultRead in results) { foreach (var user in resultRead) { log.InfoFormat("Updating user : {0}", user.Name); UpdateUser(user); } } UpdateReposytorys(); }
public void ReadNullLog() { var reader = new SVNReader(0); reader.Read(null); }