public void ParseUsernameAndUSDate()
		{
			Modification mod = new Modification();
			
			string line = "foo\r\nUser: Admin        Date:  9/16/02   Time:  2:40p\r\n";
			CheckInParser parser = new CheckInParser(line, new VssLocale(new CultureInfo("en-US")));
			parser.ParseUsernameAndDate(mod);
			string expectedUsername = "******";
			DateTime expectedDate = new DateTime(2002, 09, 16, 14, 40, 0);
			Assert.AreEqual(expectedUsername, mod.UserName);
			Assert.AreEqual(expectedDate, mod.ModifiedTime);
		}
		public void ShouldThrowCruiseControlExceptionShowingDateStringIfCannotParseDate()
		{
			Modification mod = new Modification();
			string line = "foo\r\nUser: Admin        Date:  16/24/02   Time:  22:40\r\n";
            CheckInParser myParser = new CheckInParser(line, new VssLocale(CultureInfo.InvariantCulture));
            Assert.That(delegate { myParser.ParseUsernameAndDate(mod); },
                        Throws.TypeOf<CruiseControlException>());
		}
		public void ParseUsernameAndUKDate()
		{
			Modification mod = new Modification();
			string line = "foo\r\nUser: Admin        Date:  16/9/02   Time:  22:40\r\n";
            CheckInParser myParser = new CheckInParser(line, new VssLocale(new CultureInfo("en-GB")));
            myParser.ParseUsernameAndDate(mod);

			Assert.AreEqual("Admin", mod.UserName);
			Assert.AreEqual(new DateTime(2002, 9, 16, 22, 40, 0), mod.ModifiedTime);
		}
		public void ParseNonCommentAtCommentLine()
		{
            CheckInParser myParser = new CheckInParser(EntryWithNonCommentAtCommentLine(), new VssLocale(CultureInfo.InvariantCulture));
			Modification mod = new Modification();
            myParser.ParseComment(mod);
			Assert.AreEqual(null, mod.Comment);
		}
		public void ParseMultiLineComment()
		{
            CheckInParser myParser = new CheckInParser(EntryWithMultiLineComment(), new VssLocale(CultureInfo.InvariantCulture));
			Modification mod = new Modification();
            myParser.ParseComment(mod);
			Assert.AreEqual(@"added subfolder
and then added a new line", mod.Comment);
		}
		public void ParseEmptyComment()
		{
            CheckInParser myParser = new CheckInParser(EntryWithEmptyComment(), new VssLocale(CultureInfo.InvariantCulture));
			Modification mod = new Modification();
            myParser.ParseComment(mod);
			Assert.AreEqual(String.Empty, mod.Comment);
		}
		public void ParseSingleLineComment()
		{
			CheckInParser myParser = new CheckInParser(EntryWithSingleLineComment(), new VssLocale(CultureInfo.InvariantCulture));
			Modification mod = new Modification();
			myParser.ParseComment(mod);
			Assert.AreEqual("added subfolder", mod.Comment);
		}
		public void ParseFileName() 
		{
			string fileName = "**** Im a file name.fi     ********\r\n jakfakjfnb  **** ** lkjnbfgakj ****";
			CheckInParser myParser = new CheckInParser(fileName, new VssLocale(new CultureInfo("en-US")));
            string actual = myParser.ParseFileName();
			Assert.AreEqual("Im a file name.fi", actual);
		}
		public void ParseMultiWordUsername()
		{
			Modification mod = new Modification();
			
			string line = "foo\r\nUser: Gabriel Gilabert     Date:  5/08/03   Time:  4:06a\r\n";
			CheckInParser parser = new CheckInParser(line, new VssLocale(new CultureInfo("en-US")));
			parser.ParseUsernameAndDate(mod);
			string expectedUsername = "******";
			DateTime expectedDate = new DateTime(2003, 05, 08, 04, 06, 0);
			Assert.AreEqual(expectedUsername, mod.UserName);
			Assert.AreEqual(expectedDate, mod.ModifiedTime);
		}
		public void ParseUsernameAndFRDateWithAsciiCode160()
		{
			Modification mod = new Modification();
			string line = "*****  Tools.build  *****\r\nVersion 3\r\nUtilisateur\xA0: Thomas       Date\xA0: 15/11/04   Heure\xA0: 18:24\r\nArchivé dans $/Projets/Tools\r\nCommentaire: \r\n\r\n";
			CheckInParser parser = new CheckInParser(line, new VssLocale(new CultureInfo("fr-FR")));
			parser.ParseUsernameAndDate(mod);

			Assert.AreEqual("Thomas", mod.UserName);
			Assert.AreEqual(new DateTime(2004,11,15,18,24,0), mod.ModifiedTime);
		}
		public void ParseUsernameAndFRDate()
		{
			Modification mod = new Modification();
			string line = "foo\r\nUtilisateur: Admin        Date:  2/06/04   Heure: 14:04\r\n";
            CheckInParser myParser = new CheckInParser(line, new VssLocale(new CultureInfo("fr-FR")));
            myParser.ParseUsernameAndDate(mod);

			Assert.AreEqual("Admin", mod.UserName);
			Assert.AreEqual(new DateTime(2004,6,2,14,4,0), mod.ModifiedTime);
		}