// ****************************************************************
// Copyright 2007, Charlie Poole
// This is free software licensed under the NUnit license. You may
// obtain a copy of the license at http://nunit.org/?p=license&r=2.4
// ****************************************************************
using System;
namespace NUnit.Mocks
{
///
/// Summary description for IMock.
///
public interface IMock : IVerify, ICallHandler
{
///
/// The name of this mock - used in messages
///
string Name { get; }
///
/// True if unexpected calls should cause an error, false to ignore them
///
bool Strict { get; set; }
///
/// Set up to expect a call to a method with a set of arguments
///
/// The name of the method
/// Arguments for this call
void Expect( string methodName, params object[] args );
void Expect( string MethodName );
///
/// Set up expectation that the named method will not be called
///
/// The name of the method
void ExpectNoCall( string methodName );
///
/// Set up to expect a call to a method with a set of arguments.
/// The specified value will be returned.
///
/// The name of the method
/// The value to be returned
/// Arguments for this call
void ExpectAndReturn( string methodName, object returnVal, params object[] args );
///
/// Set up to expect a call to a method with a set of arguments.
/// The specified exception will be thrown.
///
/// The name of the method
/// The exception to throw
/// Arguments for this call
void ExpectAndThrow( string methodname, Exception exception, params object[] args );
///
/// Set value to return for a method or property called with any arguments
///
/// The name of the method
/// The value to be returned
void SetReturnValue( string methodName, object returnVal );
}
}