-
When setting expectations on object values, it's quite useful to evaluate the expected values in a lazy way, so that the test code has a chance to set the value.
i.e. consider the case where I'm setting an expectation on a view interface that will check that an argument passed-in matches a value existing on the correponding presenter, which is what's under test:
Expect.Once.On(view)...
2007-07-10 03:32:45 UTC in NMock
-
My mistake. Should have used:
With(Is.EqualTo("bar"), Is.Anything);.
2007-07-10 03:04:50 UTC in NMock
-
Create a matcher that receives a delegate that performs the matching. This would avoid creation of custom matchers for many common scenarios (i.e. lazy check on property values, etc.).
Expect.Once.On(foo).With(new DelegateMatcher(delegate { return bar.Value == "hello"; }));
Note that with C# 3.0 syntax it will look much better:
Expect.Once.On(foo).With(new DelegateMatcher(() =>...
2007-07-10 02:58:11 UTC in NMock
-
The following fails:
public class Program
{
static void Main(string[] args)
{
Mockery mocks = new Mockery();
IFoo foo = mocks.NewMock();
Expect.Once.On(foo).Method("Do").With(
new ArgumentsMatcher(
Is.EqualTo("bar"),
Is.Anything));
foo.Do("bar", "hello world");
mocks.VerifyAllExpectationsHaveBeenMet();
}
public interface IFoo
{
void...
2007-07-10 02:50:10 UTC in NMock
-
This method is insanely verbose and long.
As there's only one way of verifying expectations (i.e. there's no corresponding VerifySomeExpectationsHaveBeenMet, VerifyNoExpectationsHaveBeenMet, etc), it doesn't make sense to have such a long method name.
Mockery.VerifyExpectations would be much nicer.
Thanks.
2007-06-22 22:49:40 UTC in NMock
-
When importing folders with large number of files, having to reference these from Features is very annoying.
If a ComponentGroup was created on the fly for the set of items added, it would be much easier to refer to the group as a whole from the respective Feature.
2007-01-22 17:49:15 UTC in WixEdit
-
Uploaded patch contains the fixes for the other bug I reported also (http://sourceforge.net/tracker/index.php?func=detail&aid=1641756&group_id=133314&atid=726876, or bug # 1641756).
File Added: UniqueIdsImport.patch.
2007-01-22 17:32:43 UTC in WixEdit
-
Uniqueness of generated Ids is not ensured.
Import two folders containing equally named subfolders, and you end up with duplicate Directory Ids.
2007-01-22 16:57:22 UTC in WixEdit
-
I also found that short name generation contains a bug, as it allows whitespaces.
Last uploaded patch contains both fixes.
File Added: FileImport.cs.patch.
2007-01-22 16:47:34 UTC in WixEdit
-
In WiX it's valid for long names to contain whitespaces in the name. The source code comment in the method that generates valid long names even acknowledges that.
However, the regex used to perform the replace is the same one used in the generation of unique Ids, which matches whitespaces. This is incorrect and causes many manual edits to be required.
2007-01-22 16:18:12 UTC in WixEdit