From: Clayton H. <cla...@sp...> - 2003-09-18 06:08:31
|
Hi Gerald, First of all, many thanks for the patches and the tests. I had a chance to checkout some of the TODO: statements. // TODO: Find out if there is any reason why the Factory class // does not have static methods No reason in particular. I guess I always have the idea in the back of my head that threading + static =3D=3D !good, but besides that paranoia there is no reason.=20 // TODO: need *nix style dir when testing on *nix Added an IsWindows, IsUnix switch using Path.DirectorySeperator as the switch. Not much testing but I think the idea is there. I also googled for some more ideas and got the following links which might be helpful: http://lists.ximian.com/archives/public/mono-list/2002-March/004521.html which links to: http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/cpref/= h tml/frlrfSystemIOPathClassVolumeSeparatorCharTopic.asp // TODO: check what format the date should come back in Assertion.Assert (entry.Date, entry.Date.Equals ("03 Jan 2003 04:07:36 -0000")); I agree with this one, based on the following: =20 http://www.elegosoft.com/cvs/cvsclient.html#SEC11 // TODO: Check if it makes any sense to test Revision, Date, etc. [In reference to directory information] Good question. I would say "no", I think in cvs folders are either there or they are there :-). I don't think the server passes down any date/ time information. Mostly just thoughts here, I could not find any documentation, but the tortoise files seem to confirm this. /// TODO: Check if this should really throw an exception. /// Cederqvist seems to imply that an invalid date is OK, /// and that the only thing that is important is whether=20 /// the timestamp of the actual file matches what's in=20 /// this field or not. I am not familiar with Cederqvist...I agree with you though, I do not think that the entry should be throwing an exception if it gets a "bad" date time format. If you don't think so either and we can pull it out. I have also created a parser to handle this ugly date string parsing. I will commit it so you can take a look (it will be in the hopefully not so ubiquitous Util namespace). Thanks again, I will post your code to the patches list. =20 Clayton -----Original Message----- From: Gerald Evans [mailto:gn...@f2...]=20 Sent: September 17, 2003 9:32 AM To: Clayton Harbour Subject: FileSystem unit tests Clayton, I've been looking at the unit tests for FileSystem. I've expanded the current tests for Root, Repository and Entry. There is a=20 patch file within FileSystem.zip for these. I have also added new files to test Factory, PathTranslator and Tag. These=20 files are included in the zip. I've left several 'TODO:'s in the code which I hope to be able to return to=20 when I have a better understanding of the system. The tests are pretty basic with very little testing of invalid arguments except for the cases where I have seen that the code explicitly checks for=20 invalid arguments. Please let me know if you would like the tests to be more exhaustive. Also attached is a small fix for PathTranslator. Currently a global replace is used to delete any occurence of the filename=20 within the entire path. If the filename did appear elsewhere in the path,=20 then the path would end up being incorrect. I was thinking of looking at Misc next together with some of the other=20 smaller directories. Gerald. |