public void ParseUserFile_MissingEmail() { using (var reader = new StringReader(UserMapResources.MissingEmail)) { var map = new UserMap("example.com"); map.ParseUserFile(reader, "User File"); } }
public void ParseUserFile_Duplicate() { using (var reader = new StringReader(UserMapResources.Duplicate)) { var map = new UserMap("example.com"); map.ParseUserFile(reader, "User File"); } }
public void ParseUserFile_ExtraField() { using (var reader = new StringReader(UserMapResources.ExtraField)) { var map = new UserMap("example.com"); map.ParseUserFile(reader, "User File"); } }
public void GetUser_NotFound() { var map = new UserMap("example.com"); var user = map.GetUser("fred"); Assert.AreEqual(user.Name, "fred"); Assert.AreEqual(user.Email, "*****@*****.**"); Assert.IsTrue(user.Generated); }
public Importer(ILogger log, IConfig config, UserMap userMap, BranchStreamCollection branches, IDictionary <string, Commit> tags, Cvs cvs) { m_log = log; m_config = config; m_userMap = userMap; m_branches = branches; m_tags = tags; m_cvs = cvs; m_player = new CommitPlayer(log, branches); }
public Importer(ILogger log, IConfig config, UserMap userMap, BranchStreamCollection branches, IDictionary<string, Commit> tags, Cvs cvs) { m_log = log; m_config = config; m_userMap = userMap; m_branches = branches; m_tags = tags; m_cvs = cvs; m_player = new CommitPlayer(log, branches); }
private UserMap GetUserMap() { var m_userMap = new UserMap(this.DefaultDomain); m_userMap.AddEntry("", this.Nobody); if (m_switches.UserFile != null) { m_userMap.ParseUserFile(m_switches.UserFile); } return(m_userMap); }
public void GetUser_FromFile() { using (var reader = new StringReader(UserMapResources.Good)) { var map = new UserMap("blah.com"); map.ParseUserFile(reader, "User File"); var joe = map.GetUser("joe"); Assert.AreEqual(joe.Name, "Joe Bloggs"); Assert.AreEqual(joe.Email, "*****@*****.**"); Assert.IsFalse(joe.Generated); var fred = map.GetUser("fred"); Assert.AreEqual(fred.Name, "Fred X"); Assert.AreEqual(fred.Email, "*****@*****.**"); Assert.IsFalse(fred.Generated); } }
private UserMap GetUserMap() { var m_userMap = new UserMap(this.DefaultDomain); m_userMap.AddEntry("", this.Nobody); if (m_switches.UserFile != null) m_userMap.ParseUserFile(m_switches.UserFile); return m_userMap; }