c# - How do I assert this method call by AssertWasCalled without testing the method parameters? -


I want to see if the logoninerenz method has been called and what parameter parameters It was said to ignore the test; I'm just interested if the LogNot In Orange was called or not.

What is the correct Rhino Max syntax for this (what I gave below was given below)?

  [TestMethod] Public Zero MyTestMethod () {var logger = MockRepository.GenerateMock & lt; ILogManager & gt; (); Var Teleporter = New Teleporter () {LogEventManager = logger}; Var Message = New Message () {IsDone = false}; Teleporter.Teleport (message); // How should I specify parameter 1 and parameter 2? Logger.AssertWasCalled (t = & gt; t.LogNotInRange (parameter1, parameter2)); } Public Zero LogNotInRange (object parameter1, object parameter2) {// some logging logic}    

Use Arg & lt; T & gt; Anything :

  logger.AssertWasCalled (t = & gt; t.LogNotInRange (Arg & lt; Object & gt; .Is.Anything, Arg & lt; Object & gt; ; .Is.Anything));    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -