This list is closed, nobody may subscribe to it.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(99) |
Feb
(163) |
Mar
(3) |
Apr
(33) |
May
(8) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
(10) |
Apr
|
May
|
Jun
(16) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Griffin C. <gc...@us...> - 2005-04-23 21:28:48
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23363/DotNetMock/Dynamic Added Files: MethodSignature.cs Log Message: - Added Romans' MethodSignature abstraction --- NEW FILE: MethodSignature.cs --- using System; using System.Reflection; namespace DotNetMock.Dynamic { /// <summary> /// Class encapsulates a method signature of a single method. /// </summary> /// <author>Roman V. Gavrilov</author> public class MethodSignature { private Type[] _paramTypes; private string _methodName; private Type _returnType; #region Constructors /// <summary> /// Create new instance based on given information. /// </summary> /// <param name="methodName">Name of the method.</param> /// <param name="returnType">Method return type.</param> /// <param name="paramTypes">Parameter types.</param> public MethodSignature( string methodName, Type returnType, params Type[] paramTypes ) { _methodName = methodName; _returnType = returnType; _paramTypes = ( Type[] )paramTypes.Clone( ); } /// <summary> /// Create new instance of method signature from MethodInfo. /// </summary> /// <param name="methodInfo">MethodInfo to use for method signature instantiation.</param> public MethodSignature( MethodInfo methodInfo ) { ParameterInfo[] paramInfos = methodInfo.GetParameters( ); Type[] paramTypes = new Type[paramInfos.Length]; foreach ( ParameterInfo paramInfo in paramInfos ) { paramTypes[ paramInfo.Position ] = paramInfo.ParameterType; } _methodName = methodInfo.Name; _returnType = methodInfo.ReturnType; _paramTypes = paramTypes; } #endregion #region Public Properties /// <summary> /// Returns <see cref="DotNetMock.Dynamic.MethodSignature"/>s parameter types. /// </summary> public Type[] ParamTypes { get { return _paramTypes; } } /// <summary> /// Returns <see cref="DotNetMock.Dynamic.MethodSignature"/>s method name. /// </summary> public string MethodName { get { return _methodName; } } /// <summary> /// Returns <see cref="DotNetMock.Dynamic.MethodSignature"/>s return type. /// </summary> public Type ReturnType { get { return _returnType; } } #endregion /// <summary> /// Compare two signatures by content. /// </summary> public override bool Equals( object obj ) { if ( obj == null ) { return false; } if ( !( obj is MethodSignature ) ) { return false; } MethodSignature that = ( MethodSignature )obj; if ( that.MethodName.CompareTo( this.MethodName ) != 0 ) { return false; } if ( !that.ReturnType.Equals( this.ReturnType ) ) { return false; } if ( that.ParamTypes.Length != this.ParamTypes.Length ) { return false; } for ( int idx = 0; idx < that.ParamTypes.Length; ++idx ) { if ( !that.ParamTypes[ idx ].Equals( this.ParamTypes[ idx ] ) ) { return false; } } return true; } /// <summary> /// Returns string representation of the instance of <see cref="DotNetMock.Dynamic.MethodSignature"/> /// </summary> /// <returns>string representation of the instance of <see cref="DotNetMock.Dynamic.MethodSignature"/></returns> public override string ToString( ) { string paramTypesString = null; foreach ( Type paramType in _paramTypes ) { if ( paramTypesString != null ) { paramTypesString += ", "; } paramTypesString += paramType.ToString( ); } string str = string.Format( "{0} {1}({2})", _returnType.ToString( ), _methodName, paramTypesString ); return str; } /// <summary> /// Returns hashcode of base class /// </summary> /// <returns></returns> public override int GetHashCode( ) { return base.GetHashCode( ); } } } |
From: Griffin C. <gc...@us...> - 2005-04-23 21:28:47
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23363/DotNetMock.Tests/Dynamic Added Files: MethodSignatureTests.cs Log Message: - Added Romans' MethodSignature abstraction --- NEW FILE: MethodSignatureTests.cs --- using System; using System.Reflection; using DotNetMock.Dynamic; using NUnit.Framework; namespace DotNetMock.Tests.Dynamic { [TestFixture] public class MethodSignatureTest { #region Test Cases /// <summary> /// Test Equals method. /// </summary> [Test] public void TestEquals( ) { MethodSignature sign1 = new MethodSignature( "Method1", typeof ( Exception ), typeof ( bool ), typeof ( object ), typeof ( Exception ) ); MethodSignature sign2 = new MethodSignature( "Method1", typeof ( Exception ), typeof ( bool ), typeof ( object ), typeof ( Exception ) ); MethodSignature sign3 = new MethodSignature( "Method2", typeof ( Exception ), typeof ( bool ), typeof ( object ), typeof ( Exception ) ); MethodSignature sign4 = new MethodSignature( "Method1", typeof ( void ), typeof ( bool ), typeof ( object ), typeof ( Exception ) ); MethodSignature sign5 = new MethodSignature( "Method1", typeof ( Exception ), typeof ( object ), typeof ( Exception ) ); Assert.IsTrue( sign1.Equals( sign2 ), "sign1.Equals(sign2) shall be true." ); Assert.IsFalse( sign1.Equals( sign3 ), "sign1.Equals(sign3) shall be false." ); Assert.IsFalse( sign1.Equals( sign4 ), "sign1.Equals(sign4) shall be false." ); Assert.IsFalse( sign1.Equals( sign5 ), "sign1.Equals(sign5) shall be false." ); } /// <summary> /// New instance of signature can be created from MethodInfo type parameter. /// </summary> [Test] public void ConstructorWithMethodInfoParameter( ) { MethodInfo methodInfo = typeof ( MethodSignatureTest ).GetMethod( "TestMethod" ); MethodSignature signature1 = new MethodSignature( methodInfo ); MethodSignature signature2 = new MethodSignature( "TestMethod", typeof ( int ), typeof ( object ), typeof ( int ) ); Assert.AreEqual( signature1, signature2, "signature1 shall be equal to signature2." ); } /// <summary> /// Test ToString() routine. /// </summary> [Test] public void TestToString( ) { MethodSignature sign = new MethodSignature( "Method1", typeof ( Exception ), typeof ( bool ), typeof ( object ), typeof ( Exception ) ); string actual = sign.ToString( ); string expected = "System.Exception Method1(System.Boolean, System.Object, System.Exception)"; Assert.AreEqual( expected, actual ); } #endregion /// <summary> /// Method used for testing. This method is not being called but simply here to supply MethodInfo /// structure for testing. /// </summary> public int TestMethod( object obj, int i ) { throw new InvalidOperationException( "This method is for testing purposes only and shall never be called." ); } } } |
From: Griffin C. <gc...@us...> - 2005-04-23 21:28:47
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23363/DotNetMock.Tests Modified Files: DotNetMock.Tests.csproj Log Message: - Added Romans' MethodSignature abstraction Index: DotNetMock.Tests.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/DotNetMock.Tests.csproj,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** DotNetMock.Tests.csproj 20 Feb 2005 09:26:48 -0000 1.19 --- DotNetMock.Tests.csproj 23 Apr 2005 21:28:38 -0000 1.20 *************** *** 191,194 **** --- 191,199 ---- /> <File + RelPath = "Dynamic\MethodSignatureTests.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Dynamic\PredicateTests.cs" SubType = "Code" |
From: Griffin C. <gc...@us...> - 2005-04-23 21:28:47
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23363/DotNetMock Modified Files: DotNetMock.csproj Log Message: - Added Romans' MethodSignature abstraction Index: DotNetMock.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/DotNetMock.csproj,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** DotNetMock.csproj 4 Mar 2005 00:18:40 -0000 1.37 --- DotNetMock.csproj 23 Apr 2005 21:28:39 -0000 1.38 *************** *** 255,258 **** --- 255,263 ---- /> <File + RelPath = "Dynamic\MethodSignature.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Dynamic\PredicateUtils.cs" SubType = "Code" |
From: Griffin C. <gc...@us...> - 2005-04-23 20:58:33
|
Update of /cvsroot/dotnetmock/dotnetmock/docs/ChangeLogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8822/docs/ChangeLogs Added Files: Changes-0.7.6.txt Log Message: Rolled in fix for bug 1174059 --- NEW FILE: Changes-0.7.6.txt --- - Fixed bug 1174059 ( Thanks Kari Hirvi ) |
From: Griffin C. <gc...@us...> - 2005-04-23 20:58:32
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8822/DotNetMock.Framework/Data Modified Files: MockTransaction.cs Log Message: Rolled in fix for bug 1174059 Index: MockTransaction.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Data/MockTransaction.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MockTransaction.cs 12 Feb 2005 09:23:39 -0000 1.7 --- MockTransaction.cs 23 Apr 2005 20:58:23 -0000 1.8 *************** *** 18,21 **** --- 18,23 ---- private Exception _rollbackException = null; + private bool _hasCommitFailed = false; // to allow for rollback later + /// <summary> /// Default Constructor *************** *** 70,74 **** } _rollbackCalled.Actual = true; ! if ( _commitCalled.Actual ) { throw new InvalidOperationException( "Cannot call rollback after Commit() has been called." ); --- 72,76 ---- } _rollbackCalled.Actual = true; ! if ( _commitCalled.Actual && _hasCommitFailed == false) { throw new InvalidOperationException( "Cannot call rollback after Commit() has been called." ); *************** *** 91,94 **** --- 93,97 ---- if ( _commitException != null ) { + _hasCommitFailed = true; throw _commitException; } |
From: Griffin C. <gc...@us...> - 2005-04-23 20:58:32
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework.Tests/Data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8822/DotNetMock.Framework.Tests/Data Modified Files: MockTransactionTests.cs Log Message: Rolled in fix for bug 1174059 Index: MockTransactionTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework.Tests/Data/MockTransactionTests.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MockTransactionTests.cs 12 Feb 2005 08:53:57 -0000 1.6 --- MockTransactionTests.cs 23 Apr 2005 20:58:22 -0000 1.7 *************** *** 126,129 **** --- 126,148 ---- _mockTransaction.Verify(); } + [Test] + public void CommitFailAndRollback() + { + _mockTransaction.ExpectCommitCall( true ); + _mockTransaction.ExpectRollbackCall(true); + _mockTransaction.SetExpectedCommitException( new AssertionException("Simulating commit failure") ); + try + + { + _mockTransaction.Commit(); + Assertion.Fail( "Should throw an exception." ); + } + catch ( AssertionException ) + { + _mockTransaction.Rollback(); + } + _mockTransaction.Verify(); + + } } } |
From: Choy R. <ch...@us...> - 2005-04-08 03:33:09
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Generate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24311/DotNetMock/Dynamic/Generate Modified Files: MockClassBuilder.cs Log Message: BUG 1178977 : argument names weren't showing up in assertion failure messages. this is because we didn't define the parameters in our proxy class with names. so I just copied the parameter meta data from the originating type. Index: MockClassBuilder.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Generate/MockClassBuilder.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MockClassBuilder.cs 9 Jan 2005 06:48:35 -0000 1.1 --- MockClassBuilder.cs 8 Apr 2005 03:33:01 -0000 1.2 *************** *** 119,123 **** public void ImplementMockedMethod(MethodInfo mi) { ! ImplementMockedMethod(mi.Name, mi.ReturnType, getParameterTypes(mi)); } /// <summary> --- 119,123 ---- public void ImplementMockedMethod(MethodInfo mi) { ! ImplementMockedMethod(mi.Name, mi.ReturnType, getParameterTypes(mi), mi); } /// <summary> *************** *** 129,133 **** /// <param name="parameterTypes">array of <see cref="Type"/>s in /// the method signature</param> ! public void ImplementMockedMethod(string methodName, Type returnType, Type[] parameterTypes) { if ( IsCompiled ) --- 129,134 ---- /// <param name="parameterTypes">array of <see cref="Type"/>s in /// the method signature</param> ! /// <param name="mi">if not null, used to get extra parameter information</param> ! public void ImplementMockedMethod(string methodName, Type returnType, Type[] parameterTypes, MethodInfo mi) { if ( IsCompiled ) *************** *** 143,146 **** --- 144,160 ---- parameterTypes ); + if ( mi!=null ) + { + ParameterInfo[] pis = mi.GetParameters(); + for (int i = 0; i<pis.Length; ++i) + { + ParameterInfo pi = pis[i]; + methodBuilder.DefineParameter( + i+1, + pi.Attributes, + pi.Name + ); + } + } ILGenerator il = methodBuilder.GetILGenerator(); |
From: Choy R. <ch...@us...> - 2005-04-08 03:33:09
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/Generate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24311/DotNetMock.Tests/Dynamic/Generate Modified Files: ClassGeneratorTests.cs Log Message: BUG 1178977 : argument names weren't showing up in assertion failure messages. this is because we didn't define the parameters in our proxy class with names. so I just copied the parameter meta data from the originating type. Index: ClassGeneratorTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/Generate/ClassGeneratorTests.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ClassGeneratorTests.cs 12 Feb 2005 18:10:36 -0000 1.16 --- ClassGeneratorTests.cs 8 Apr 2005 03:33:00 -0000 1.17 *************** *** 112,115 **** --- 112,131 ---- private MethodInfo _methodInfo = null; } + + [Test] public void NamedParametersAvailableInProxy() + { + DirectionalMockedCallHandler dmch = + new DirectionalMockedCallHandler(); + IDirectionalParameters dp = (IDirectionalParameters) + cg.Generate(typeof(IDirectionalParameters), dmch); + Type dpt = dp.GetType(); + MethodInfo mi = dpt.GetMethod("DoWithInParameters"); + ParameterInfo[] pis = mi.GetParameters(); + Assert.AreEqual(2, pis.Length); + Assert.AreEqual(typeof(int), pis[0].ParameterType); + Assert.AreEqual(typeof(string), pis[1].ParameterType); + Assert.AreEqual("a", pis[0].Name); + Assert.AreEqual("b", pis[1].Name); + } [Test] public void GeneratePersistentAssembly() |
From: Choy R. <ch...@us...> - 2005-04-08 02:57:18
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7216/DotNetMock/Dynamic Modified Files: DynamicMock.cs ExpectationMethod.cs Log Message: BUG 1163942 : expectation should fail if passed the wrong number of arguments. But there is some legacy functionality we need to support so I needed to do some hacking to ensure that we can still specify that we DON'T want to check arguments. perhaps this is better handled through an expectation hierarchy as Roman suggested. Index: DynamicMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicMock.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** DynamicMock.cs 8 Apr 2005 00:05:09 -0000 1.21 --- DynamicMock.cs 8 Apr 2005 02:57:09 -0000 1.22 *************** *** 137,141 **** public virtual void Expect(string methodName, params object[] args) { ! ExpectAndReturn(methodName, null, args); } /// <summary> --- 137,149 ---- public virtual void Expect(string methodName, params object[] args) { ! if ( args.Length>0 ) ! { ! ExpectAndReturn(methodName, null, args); ! } ! else ! { ! // no argument checking ! addExpectation(new ExpectationMethod(methodName)); ! } } /// <summary> Index: ExpectationMethod.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/ExpectationMethod.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ExpectationMethod.cs 8 Apr 2005 00:05:09 -0000 1.22 --- ExpectationMethod.cs 8 Apr 2005 02:57:09 -0000 1.23 *************** *** 41,45 **** /// </summary> /// <param name="methodName">Method name to expect</param> ! public ExpectationMethod( string methodName ) : this( methodName, null ) {} /// <summary> /// Default Constructor --- 41,48 ---- /// </summary> /// <param name="methodName">Method name to expect</param> ! public ExpectationMethod( string methodName ) ! : this(methodName, null, null, null) ! { ! } /// <summary> /// Default Constructor *************** *** 47,51 **** /// <param name="methodName">Method name to expect</param> /// <param name="returnValue">return value when expectation is called</param> ! public ExpectationMethod( string methodName, object returnValue ) : this( methodName, returnValue, null ){} /// <summary> /// Default Constructor --- 50,57 ---- /// <param name="methodName">Method name to expect</param> /// <param name="returnValue">return value when expectation is called</param> ! public ExpectationMethod( string methodName, object returnValue ) ! : this( methodName, returnValue, null, null ) ! { ! } /// <summary> /// Default Constructor *************** *** 54,58 **** /// <param name="returnValue">return value when expectation is called</param> /// <param name="argumentExpectations">Expectations on the arguments</param> ! public ExpectationMethod( string methodName, object returnValue, object[] argumentExpectations ) : this( methodName, returnValue, argumentExpectations, null ){} /// <summary> /// Default Constructor --- 60,71 ---- /// <param name="returnValue">return value when expectation is called</param> /// <param name="argumentExpectations">Expectations on the arguments</param> ! public ExpectationMethod( ! string methodName, ! object returnValue, ! object[] argumentExpectations ! ) ! : this( methodName, returnValue, argumentExpectations, null ) ! { ! } /// <summary> /// Default Constructor *************** *** 62,76 **** /// <param name="argumentExpectations">Expectations on the arguments</param> /// <param name="expectedException">Exception to throw when called.</param> ! public ExpectationMethod( string methodName, object returnValue, object[] argumentExpectations, Exception expectedException) { _expectedMethodName = methodName; ! if (argumentExpectations == null) ! { ! _argumentExpectations = new object[0]; ! } ! else ! { ! _argumentExpectations = argumentExpectations; ! } _expectedReturnValue = returnValue; --- 75,87 ---- /// <param name="argumentExpectations">Expectations on the arguments</param> /// <param name="expectedException">Exception to throw when called.</param> ! public ExpectationMethod( ! string methodName, ! object returnValue, ! object[] argumentExpectations, ! Exception expectedException ! ) { _expectedMethodName = methodName; ! _argumentExpectations = argumentExpectations; _expectedReturnValue = returnValue; *************** *** 197,203 **** )); } object[] actualArguments = ActualMethodCall.Arguments; ! // actual arguments must be greater than or equal to expectations ! if ( actualArguments.Length<_argumentExpectations.Length) { Assertion.Fail(String.Format( --- 208,218 ---- )); } + if ( _argumentExpectations==null ) + { + return; + } object[] actualArguments = ActualMethodCall.Arguments; ! // actual arguments must be equal to expectations ! if ( actualArguments.Length!=_argumentExpectations.Length) { Assertion.Fail(String.Format( |
From: Choy R. <ch...@us...> - 2005-04-08 02:57:18
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7216/DotNetMock.Tests/Dynamic Modified Files: AbstractDynamicMockTests.cs ExpectationMethodTests.cs Log Message: BUG 1163942 : expectation should fail if passed the wrong number of arguments. But there is some legacy functionality we need to support so I needed to do some hacking to ensure that we can still specify that we DON'T want to check arguments. perhaps this is better handled through an expectation hierarchy as Roman suggested. Index: ExpectationMethodTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/ExpectationMethodTests.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ExpectationMethodTests.cs 8 Apr 2005 00:05:08 -0000 1.14 --- ExpectationMethodTests.cs 8 Apr 2005 02:57:09 -0000 1.15 *************** *** 24,27 **** --- 24,29 ---- void Method2(int x, int y, int z); void Method3(); + void Method4(int x); + void Method4(int x, int y); } *************** *** 29,37 **** static readonly MethodInfo method2 = typeof(IMethods).GetMethod("Method2"); static readonly MethodInfo method3 = typeof(IMethods).GetMethod("Method3"); ! [TearDown] ! public void Destroy() { ! methodCallExpectation = null; } [Test] --- 31,72 ---- static readonly MethodInfo method2 = typeof(IMethods).GetMethod("Method2"); static readonly MethodInfo method3 = typeof(IMethods).GetMethod("Method3"); + static readonly MethodInfo method4x = typeof(IMethods).GetMethod( + "Method4", + new Type[] { typeof(int) } + ); + static readonly MethodInfo method4xy = typeof(IMethods).GetMethod( + "Method4", + new Type[] { typeof(int), typeof(int) } + ); ! [ExpectedException( ! typeof(AssertionException), ! "Expected 2 arguments but received 1 in method call Method4(x=1)." ! )] ! [Test] public void CallMethodWithSameNameButFewerArguments() { ! methodCallExpectation = new ExpectationMethod( ! method4xy.Name, ! null, ! new object[] { 1, 2 } ! ); ! MethodCall call = new MethodCall(method4x, 1); ! object returnValue = methodCallExpectation.CheckCallAndSendResponse(call); ! methodCallExpectation.Verify(); ! } ! [ExpectedException( ! typeof(AssertionException), ! "Expected 1 arguments but received 2 in method call Method4(x=1, y=2)." ! )] ! [Test] public void CallMethodWithSameNameButMoreArguments() ! { ! methodCallExpectation = new ExpectationMethod( ! method4x.Name, ! null, ! new object[] { 1 } ! ); ! MethodCall call = new MethodCall(method4xy, 1, 2); ! object returnValue = methodCallExpectation.CheckCallAndSendResponse(call); ! methodCallExpectation.Verify(); } [Test] Index: AbstractDynamicMockTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/AbstractDynamicMockTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AbstractDynamicMockTests.cs 18 Feb 2005 02:16:08 -0000 1.3 --- AbstractDynamicMockTests.cs 8 Apr 2005 02:57:09 -0000 1.4 *************** *** 25,28 **** --- 25,38 ---- protected MethodInfo method1; + protected static readonly MethodInfo METHOD2A = typeof(IBlah).GetMethod( + "Method2", + new Type[] { typeof(int) } + ); + protected static readonly MethodInfo METHOD2AB = typeof(IBlah).GetMethod( + "Method2", + new Type[] { typeof(int), typeof(int) } + ); + + /// <summary> /// Create instance of <see cref="IDynamicMock"/> to test. *************** *** 47,50 **** --- 57,63 ---- void Method0(object p0, object p1); object Method1(object p0); + + void Method2(int a); + void Method2(int a, int b); } *************** *** 61,64 **** --- 74,87 ---- } + [ExpectedException(typeof(AssertionException))] + [Test] public void FailsIfPassedTooManyArguments() + { + mock = new DynamicMock(typeof(IBlah)); + mock.Expect("Method2", 1); + + IBlah blah = (IBlah) mock.Object; + blah.Method2(1, 2); + } + [Test] public void SetsRefParameter() |
From: Choy R. <ch...@us...> - 2005-04-08 02:12:21
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/TestFramework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14929/DotNetMock/TestFramework Modified Files: MbUnitStubMaker.cs Log Message: BUG 1164782 : send new object[0] instead of null to MbUnit..AreEquals(object, object, string, params object[]) Index: MbUnitStubMaker.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/TestFramework/MbUnitStubMaker.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MbUnitStubMaker.cs 29 Jan 2005 09:13:32 -0000 1.2 --- MbUnitStubMaker.cs 8 Apr 2005 02:12:12 -0000 1.3 *************** *** 46,58 **** if ( hasMessageParameter ) { parameterTypes.RemoveAt(0); parameterTypes.Add(typeof(string)); ! for (int i = 1; i<parameterTypes.Count; ++i) { EmitLdarg(ilg, i+1); } EmitLdarg(ilg, 1); ! parameterTypes.Add(typeof(object[])); ! ilg.Emit(OpCodes.Ldnull); } else --- 46,65 ---- if ( hasMessageParameter ) { + // original parameter count + int n = parameterTypes.Count; + // edit call signature parameterTypes.RemoveAt(0); parameterTypes.Add(typeof(string)); ! parameterTypes.Add(typeof(object[])); ! // push arguments starting after message arg 1 ! for (int i = 1; i<n; ++i) { EmitLdarg(ilg, i+1); } + // load format/message from arg 1 EmitLdarg(ilg, 1); ! // add empty object[] array ! ilg.Emit(OpCodes.Ldc_I4_0); ! ilg.Emit(OpCodes.Newarr, typeof(object)); } else |
From: Choy R. <ch...@us...> - 2005-04-08 02:12:20
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.TestFramework.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14929/DotNetMock.TestFramework.Tests Modified Files: MbUnitStubMakerTests.cs Log Message: BUG 1164782 : send new object[0] instead of null to MbUnit..AreEquals(object, object, string, params object[]) Index: MbUnitStubMakerTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.TestFramework.Tests/MbUnitStubMakerTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MbUnitStubMakerTests.cs 5 Feb 2005 21:46:26 -0000 1.3 --- MbUnitStubMakerTests.cs 8 Apr 2005 02:12:12 -0000 1.4 *************** *** 130,133 **** --- 130,137 ---- Assert.AreEqual(1, Arguments[1]); Assert.AreEqual(EXPECTED_MESSAGE, Arguments[2]); + Assert.IsNotNull(Arguments[3]); + object[] args = Arguments[3] as object[]; + Assert.IsNotNull(args); + Assert.AreEqual(0, args.Length); } [SetUp] public void BeforeEachTest() |
From: Choy R. <ch...@us...> - 2005-04-08 01:22:01
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21740/DotNetMock/Dynamic Modified Files: MethodCall.cs Log Message: BUG 1174229 : we should just output "N/A" if we can't stringify method call which is stringified whenever a method call expectation is not met. Index: MethodCall.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/MethodCall.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MethodCall.cs 19 Feb 2005 21:25:37 -0000 1.2 --- MethodCall.cs 8 Apr 2005 01:21:51 -0000 1.3 *************** *** 125,129 **** else { ! argumentValue = argument.ToString(); } argumentTexts[i] = String.Format( --- 125,136 ---- else { ! try ! { ! argumentValue = argument.ToString(); ! } ! catch ! { ! argumentValue = "N/A"; ! } } argumentTexts[i] = String.Format( |
From: Choy R. <ch...@us...> - 2005-04-08 01:21:59
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21740/DotNetMock.Tests/Dynamic Modified Files: MethodCallTests.cs Log Message: BUG 1174229 : we should just output "N/A" if we can't stringify method call which is stringified whenever a method call expectation is not met. Index: MethodCallTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/MethodCallTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MethodCallTests.cs 19 Feb 2005 21:25:37 -0000 1.3 --- MethodCallTests.cs 8 Apr 2005 01:21:50 -0000 1.4 *************** *** 26,29 **** --- 26,31 ---- int Property0 { get; set; } + + void Method5(ToStringThrows x); } interface IMethodsA *************** *** 31,34 **** --- 33,44 ---- void Method3(int x, string y, double z); } + class ToStringThrows + { + public override string ToString() + { + throw new Exception(); + } + + } static readonly MethodInfo method3 = typeof(IMethods).GetMethod("Method3"); *************** *** 42,45 **** --- 52,56 ---- static readonly MethodInfo property0_get = typeof(IMethods).GetMethod("get_Property0"); static readonly MethodInfo property0_set = typeof(IMethods).GetMethod("set_Property0"); + static readonly MethodInfo method5 = typeof(IMethods).GetMethod("Method5"); [Test] public void MethodNameStripsPrefixOnProperties() *************** *** 57,60 **** --- 68,73 ---- mc = new MethodCall(method4); Assert.AreEqual("Method4()", mc.ToString()); + mc = new MethodCall(method5, new ToStringThrows()); + Assert.AreEqual("Method5(x=N/A)", mc.ToString()); } [Test] public void MethodCallEqualsMethodCall() |
From: Choy R. <ch...@us...> - 2005-04-08 00:05:18
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11021/DotNetMock/Dynamic Modified Files: DynamicMock.cs ExpectationMethod.cs IMethodCallExpectation.cs Log Message: Make IMethodCallExpectation even more minimal. Index: IMethodCallExpectation.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/IMethodCallExpectation.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IMethodCallExpectation.cs 4 Mar 2005 00:18:42 -0000 1.1 --- IMethodCallExpectation.cs 8 Apr 2005 00:05:09 -0000 1.2 *************** *** 14,22 **** { /// <summary> - /// Actual <see cref="MethodCall"/>. - /// </summary> - MethodCall ActualMethodCall { set; } - - /// <summary> /// Expected method name. /// </summary> --- 14,17 ---- *************** *** 24,39 **** /// <summary> ! /// Expected return value. ! /// </summary> ! object ReturnValue { get; } ! ! /// <summary> ! /// Verify this expectation. /// </summary> /// <remarks> ! /// I'd extend <see cref="IVerifiable"/> but that ! /// currently causes compilation problems. /// </remarks> ! void Verify(); } } --- 19,31 ---- /// <summary> ! /// Check actual incoming method call and return expected outgoing response. /// </summary> + /// <param name="call">incoming call</param> + /// <returns>expected return value</returns> /// <remarks> ! /// The outgoing response may be an exception or the modification ! /// of ref/out parameters. /// </remarks> ! object CheckCallAndSendResponse(MethodCall call); } } Index: DynamicMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicMock.cs,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** DynamicMock.cs 4 Mar 2005 00:18:41 -0000 1.20 --- DynamicMock.cs 8 Apr 2005 00:05:09 -0000 1.21 *************** *** 191,197 **** } IMethodCallExpectation e = nextExpectation(methodCall); ! e.ActualMethodCall = methodCall; ! e.Verify(); ! return e.ReturnValue; } /// <summary> --- 191,195 ---- } IMethodCallExpectation e = nextExpectation(methodCall); ! return e.CheckCallAndSendResponse(methodCall); } /// <summary> Index: ExpectationMethod.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/ExpectationMethod.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ExpectationMethod.cs 4 Mar 2005 00:18:42 -0000 1.21 --- ExpectationMethod.cs 8 Apr 2005 00:05:09 -0000 1.22 *************** *** 246,249 **** --- 246,260 ---- } } + + /// <summary> + /// Check actual incoming method call and return expected outgoing response. + /// <see cref="IMethodCallExpectation.CheckCallAndSendResponse"/> + /// </summary> + public object CheckCallAndSendResponse(MethodCall call) + { + _actualMethodCall = call; + this.Verify(); + return _expectedReturnValue; + } } } |
From: Choy R. <ch...@us...> - 2005-04-08 00:05:18
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11021/DotNetMock.Tests/Dynamic Modified Files: ExpectationMethodTests.cs Log Message: Make IMethodCallExpectation even more minimal. Index: ExpectationMethodTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/ExpectationMethodTests.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ExpectationMethodTests.cs 20 Feb 2005 09:26:48 -0000 1.13 --- ExpectationMethodTests.cs 8 Apr 2005 00:05:08 -0000 1.14 *************** *** 39,44 **** { methodCallExpectation = new ExpectationMethod(method1.Name); ! methodCallExpectation.ActualMethodCall = new MethodCall(method1); ! methodCallExpectation.Verify(); } [Test] --- 39,46 ---- { methodCallExpectation = new ExpectationMethod(method1.Name); ! MethodCall call = new MethodCall(method1); ! object returnValue = ! methodCallExpectation.CheckCallAndSendResponse(call); ! Assert.IsNull(returnValue); } [Test] *************** *** 53,58 **** { methodCallExpectation = new ExpectationMethod(method1.Name, true ); ! methodCallExpectation.ActualMethodCall = new MethodCall(method1); ! Assert.IsTrue((bool)methodCallExpectation.ReturnValue); methodCallExpectation.Verify(); } --- 55,61 ---- { methodCallExpectation = new ExpectationMethod(method1.Name, true ); ! MethodCall call = new MethodCall(method1); ! object returnValue = methodCallExpectation.CheckCallAndSendResponse(call); ! Assert.IsTrue((bool) returnValue); methodCallExpectation.Verify(); } *************** *** 73,77 **** new object[] { complexPredicate, 2, 3 } ); ! methodCallExpectation.ActualMethodCall = new MethodCall(method2, 3, 2, 1); methodCallExpectation.Verify(); } --- 76,81 ---- new object[] { complexPredicate, 2, 3 } ); ! MethodCall call = new MethodCall(method2, 3, 2, 1); ! object returnValue = methodCallExpectation.CheckCallAndSendResponse(call); methodCallExpectation.Verify(); } *************** *** 84,88 **** { methodCallExpectation = new ExpectationMethod(method2.Name, null, new object[] { 1, 2, 3 }); ! methodCallExpectation.ActualMethodCall = new MethodCall(method2, 3, 2, 1); methodCallExpectation.Verify(); } --- 88,93 ---- { methodCallExpectation = new ExpectationMethod(method2.Name, null, new object[] { 1, 2, 3 }); ! MethodCall call = new MethodCall(method2, 3, 2, 1); ! object returnValue = methodCallExpectation.CheckCallAndSendResponse(call); methodCallExpectation.Verify(); } *************** *** 95,99 **** { methodCallExpectation = new ExpectationMethod(method2.Name, null, new object[] { 1, 2, 3 }); ! methodCallExpectation.ActualMethodCall = new MethodCall(method2, 1, 3, 2); methodCallExpectation.Verify(); } --- 100,105 ---- { methodCallExpectation = new ExpectationMethod(method2.Name, null, new object[] { 1, 2, 3 }); ! MethodCall call = new MethodCall(method2, 1, 3, 2); ! object returnValue = methodCallExpectation.CheckCallAndSendResponse(call); methodCallExpectation.Verify(); } *************** *** 110,114 **** { methodCallExpectation = new ExpectationMethod(method1.Name); ! methodCallExpectation.ActualMethodCall = new MethodCall(method3); methodCallExpectation.Verify(); } --- 116,121 ---- { methodCallExpectation = new ExpectationMethod(method1.Name); ! MethodCall call = new MethodCall(method3); ! object returnValue = methodCallExpectation.CheckCallAndSendResponse(call); methodCallExpectation.Verify(); } *************** *** 121,125 **** { methodCallExpectation = new ExpectationMethod(method2.Name, null, new object[] { 1, 2, 3 }); ! methodCallExpectation.ActualMethodCall = new MethodCall(method2, 1, 3); methodCallExpectation.Verify(); } --- 128,133 ---- { methodCallExpectation = new ExpectationMethod(method2.Name, null, new object[] { 1, 2, 3 }); ! MethodCall call = new MethodCall(method2, 1, 3); ! object returnValue = methodCallExpectation.CheckCallAndSendResponse(call); methodCallExpectation.Verify(); } *************** *** 136,140 **** new object[] { 1, 2, 3, 4 } ); ! methodCallExpectation.ActualMethodCall = new MethodCall(method2, 1, 2, 3); methodCallExpectation.Verify(); } --- 144,149 ---- new object[] { 1, 2, 3, 4 } ); ! MethodCall call = new MethodCall(method2, 1, 2, 3); ! object returnValue = methodCallExpectation.CheckCallAndSendResponse(call); methodCallExpectation.Verify(); } |
From: Griffin C. <gc...@us...> - 2005-03-07 03:14:05
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18521/DotNetMock/Util Modified Files: StringUtils.cs Log Message: - Fixed small issue with casting. Index: StringUtils.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Util/StringUtils.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StringUtils.cs 20 Feb 2005 09:26:50 -0000 1.1 --- StringUtils.cs 7 Mar 2005 03:13:53 -0000 1.2 *************** *** 62,66 **** if ( arg is string ) { ! return "'"+arg as string+"'"; } else if ( arg is DictionaryEntry ) --- 62,67 ---- if ( arg is string ) { ! string stringArg = arg as string; ! return "'" + stringArg + "'"; } else if ( arg is DictionaryEntry ) |
From: Choy R. <ch...@us...> - 2005-03-04 00:19:07
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4341/DotNetMock Modified Files: DotNetMock.csproj Log Message: Factor out minimal interface for method call expectations. Index: DotNetMock.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/DotNetMock.csproj,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** DotNetMock.csproj 20 Feb 2005 09:26:49 -0000 1.36 --- DotNetMock.csproj 4 Mar 2005 00:18:40 -0000 1.37 *************** *** 235,238 **** --- 235,243 ---- /> <File + RelPath = "Dynamic\IMethodCallExpectation.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Dynamic\IMockedCallHandler.cs" SubType = "Code" |
From: Choy R. <ch...@us...> - 2005-03-04 00:18:51
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4341/DotNetMock/Dynamic Modified Files: DynamicMock.cs DynamicOrderedMock.cs ExpectationMethod.cs Added Files: IMethodCallExpectation.cs Log Message: Factor out minimal interface for method call expectations. --- NEW FILE: IMethodCallExpectation.cs --- #region License // Copyright (c) 2005 Choy Rim. All rights reserved. #endregion #region Imports using System; #endregion namespace DotNetMock.Dynamic { /// <summary> /// Interface for expectations on method calls.. /// </summary> public interface IMethodCallExpectation { /// <summary> /// Actual <see cref="MethodCall"/>. /// </summary> MethodCall ActualMethodCall { set; } /// <summary> /// Expected method name. /// </summary> string ExpectedMethodName { get; } /// <summary> /// Expected return value. /// </summary> object ReturnValue { get; } /// <summary> /// Verify this expectation. /// </summary> /// <remarks> /// I'd extend <see cref="IVerifiable"/> but that /// currently causes compilation problems. /// </remarks> void Verify(); } } Index: DynamicOrderedMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicOrderedMock.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** DynamicOrderedMock.cs 19 Feb 2005 22:14:28 -0000 1.11 --- DynamicOrderedMock.cs 4 Mar 2005 00:18:42 -0000 1.12 *************** *** 40,51 **** { if( expectations.Count!=0 ) { ! Assertion.Fail( "Unfinished scenario: method " + ((ExpectationMethod)expectations[0]).ExpectedMethodName + "() wasn't called"); } } /// <summary> ! /// Adds a <see cref="ExpectationMethod"/> to the list of expectations of the mock object. /// </summary> /// <param name="e">Expectation to add</param> ! protected override void addExpectation(ExpectationMethod e) { expectations.Add(e); --- 40,51 ---- { if( expectations.Count!=0 ) { ! Assertion.Fail( "Unfinished scenario: method " + ((IMethodCallExpectation)expectations[0]).ExpectedMethodName + "() wasn't called"); } } /// <summary> ! /// Adds a <see cref="IMethodCallExpectation"/> to the list of expectations of the mock object. /// </summary> /// <param name="e">Expectation to add</param> ! protected override void addExpectation(IMethodCallExpectation e) { expectations.Add(e); *************** *** 57,61 **** /// <see cref="MethodCall"/> to get expectation for /// </param> ! /// <returns>next <see cref="ExpectationMethod"/></returns> /// <remarks> /// This is a state mutating method. It removes the expectation from --- 57,61 ---- /// <see cref="MethodCall"/> to get expectation for /// </param> ! /// <returns>next <see cref="IMethodCallExpectation"/></returns> /// <remarks> /// This is a state mutating method. It removes the expectation from *************** *** 63,67 **** /// exceptions. /// </remarks> ! protected override ExpectationMethod nextExpectation(MethodCall methodCall) { if (expectations.Count == 0) --- 63,67 ---- /// exceptions. /// </remarks> ! protected override IMethodCallExpectation nextExpectation(MethodCall methodCall) { if (expectations.Count == 0) *************** *** 72,76 **** )); } ! ExpectationMethod e = (ExpectationMethod)expectations[0]; expectations.RemoveAt(0); return e; --- 72,76 ---- )); } ! IMethodCallExpectation e = (IMethodCallExpectation)expectations[0]; expectations.RemoveAt(0); return e; Index: DynamicMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicMock.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** DynamicMock.cs 19 Feb 2005 22:14:28 -0000 1.19 --- DynamicMock.cs 4 Mar 2005 00:18:41 -0000 1.20 *************** *** 190,194 **** return values[methodName]; } ! ExpectationMethod e = nextExpectation(methodCall); e.ActualMethodCall = methodCall; e.Verify(); --- 190,194 ---- return values[methodName]; } ! IMethodCallExpectation e = nextExpectation(methodCall); e.ActualMethodCall = methodCall; e.Verify(); *************** *** 196,203 **** } /// <summary> ! /// Adds a <see cref="ExpectationMethod"/> to the list of expectations of the mock object. /// </summary> /// <param name="e">Expectation to add</param> ! protected virtual void addExpectation(ExpectationMethod e) { IList list = (IList) expectations[e.ExpectedMethodName]; --- 196,203 ---- } /// <summary> ! /// Adds a <see cref="IMethodCallExpectation"/> to the list of expectations of the mock object. /// </summary> /// <param name="e">Expectation to add</param> ! protected virtual void addExpectation(IMethodCallExpectation e) { IList list = (IList) expectations[e.ExpectedMethodName]; *************** *** 215,219 **** /// <see cref="MethodCall"/> to get expectation for /// </param> ! /// <returns>next <see cref="ExpectationMethod"/></returns> /// <remarks> /// This is a state mutating method. It removes the expectation from --- 215,219 ---- /// <see cref="MethodCall"/> to get expectation for /// </param> ! /// <returns>next <see cref="IMethodCallExpectation"/></returns> /// <remarks> /// This is a state mutating method. It removes the expectation from *************** *** 221,225 **** /// exceptions. /// </remarks> ! protected virtual ExpectationMethod nextExpectation(MethodCall methodCall) { string methodName = methodCall.MethodName; --- 221,225 ---- /// exceptions. /// </remarks> ! protected virtual IMethodCallExpectation nextExpectation(MethodCall methodCall) { string methodName = methodCall.MethodName; *************** *** 237,241 **** Assertion.Fail(methodName + "() called too many times"); } ! ExpectationMethod e = (ExpectationMethod) list[0]; list.RemoveAt(0); return e; --- 237,241 ---- Assertion.Fail(methodName + "() called too many times"); } ! IMethodCallExpectation e = (IMethodCallExpectation) list[0]; list.RemoveAt(0); return e; Index: ExpectationMethod.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/ExpectationMethod.cs,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ExpectationMethod.cs 19 Feb 2005 21:34:39 -0000 1.20 --- ExpectationMethod.cs 4 Mar 2005 00:18:42 -0000 1.21 *************** *** 14,18 **** /// Expected method call used for building dynamic mocks /// </summary> ! public class ExpectationMethod : AbstractExpectation { /// <summary> --- 14,19 ---- /// Expected method call used for building dynamic mocks /// </summary> ! public class ExpectationMethod : ! IMethodCallExpectation { /// <summary> *************** *** 178,182 **** /// Verifies this expectation /// </summary> ! public override void Verify() { if ( ! ActualMethodCallWasSet ) --- 179,183 ---- /// Verifies this expectation /// </summary> ! public void Verify() { if ( ! ActualMethodCallWasSet ) |
From: Choy R. <ch...@us...> - 2005-02-26 19:41:32
|
Update of /cvsroot/dotnetmock/dotnetmock/doc/reference/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3919/doc/reference/src Modified Files: dynamic.xml index.xml start.xml Log Message: Some updates to the docs. Index: start.xml =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/doc/reference/src/start.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** start.xml 13 Feb 2005 10:49:49 -0000 1.1 --- start.xml 26 Feb 2005 19:41:20 -0000 1.2 *************** *** 1,20 **** <chapter id="start"> <title>Getting Started</title> - <section id="start-install"> - <title>Installation</title> - <para> - Installation is simple. Just download the release zip and unzip into - the directory of your choice. If you have InfoZip, the command could - look something like: - <screen>c:\temp> unzip DotNetMock-0.7.4.zip -d c:\sw\dotnet\dotnetmock-0.7.4</screen> - Afterwards, you could register the assemblies with the GAC. - </para> - </section> - <section id="start-using"> - <title>Using DotNetMock in Your Projects</title> - <para> - To use <classname>DynamicMock</classname>s or create your own custom mocks, you only need to add a reference to <literal>DotNetMock.dll</literal>. - </para> - </section> - </chapter> --- 1,28 ---- + <?xml version="1.0" encoding="ISO-8859-1"?> <chapter id="start"> <title>Getting Started</title> + <section id="start-install"> + <title>Installation</title> + + <para>Installation is simple. Just download the release zip and unzip + into the directory of your choice. If you have InfoZip, the command + could look something like: <screen>c:\temp> unzip DotNetMock-0.7.6.zip -d c:\sw\dotnet\dotnetmock-0.7.6</screen> + Afterwards, you could register the assemblies with the GAC.</para> + </section> + + <section id="start-using"> + <title>Using DotNetMock in Your Projects</title> + + <para>To use <classname>DynamicMock</classname>s only, you add a + reference to <filename>DotNetMock.dll</filename>. If you want to use + the static mock library, then also add a reference to + <filename>DotNetMock.Framework.dll</filename>.</para> + + <para>You will also need add reference to a unit testing framework. + Currently, we support NUnit and MbUnit. We recommend that you set + "Copy Local" to true in the properties of the test framework + reference. DotNetMock binds to the testing framework dynamically so it + can support most versions of NUnit and MbUnit.</para> + </section> + </chapter> \ No newline at end of file Index: index.xml =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/doc/reference/src/index.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.xml 13 Feb 2005 10:49:49 -0000 1.1 --- index.xml 26 Feb 2005 19:41:20 -0000 1.2 *************** *** 1,66 **** ! <?xml version='1.0' encoding="iso-8859-1"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" ! "../../docbook/lib/docbook-dtd/docbookx.dtd" ! [ ! <!ENTITY preface SYSTEM "preface.xml"> ! <!ENTITY start SYSTEM "start.xml"> ! <!ENTITY dynamic SYSTEM "dynamic.xml"> ! <!ENTITY static SYSTEM "static.xml"> ! <!ENTITY xunit SYSTEM "xunit.xml"> ! <!ENTITY faq SYSTEM "faq.xml"> ]> <book> ! <bookinfo> ! <title>DotNetMock - Mock Objects for .NET</title> ! <subtitle>Reference Documentation</subtitle> ! <releaseinfo>Version 0.7.4</releaseinfo> ! <pubdate>February 12, 2005 - (Work in progress)</pubdate> ! <authorgroup> ! <author> ! <firstname>Griffin</firstname> ! <surname>Caprio</surname> ! </author> ! <author> ! <firstname>Choy</firstname> ! <surname>Rim</surname> ! </author> ! </authorgroup> ! <legalnotice> ! <para> ! Copies of this document may be made for your own use and for ! distribution to others, provided that you do not charge any fee for such ! copies and further provided that each copy contains this Copyright ! Notice, whether distributed in print or electronically. ! </para> ! </legalnotice> ! </bookinfo> ! <toc/> ! <preface id="preface-ack"> ! <title>Acknowledgements</title> ! <para> ! This project and many others owe a debt of gratitude to Chris Bauer ! (of the <ulink url="http://www.hibernate.org/">Hibernate</ulink> ! project team), who prepared and adapted the DocBook-XSL software ! used to create Hibernate's reference guide, allowing us to create ! this guide. ! </para> ! </preface> ! <preface id="preface-intro"> ! <title>Introduction</title> ! <para> ! DotNetMock is a framework and library which facilitates the use of ! mock objects for unit testing on the .NET platform. It supports the ! dynamic creation of mock objects and the development of custom mock ! objects. It also contains a library of pre-built mock objects for ! typical purposes. It integrates with the NUnit, MbUnit and csUnit ! testing frameworks. ! </para> ! </preface> ! &start; ! &dynamic; ! &static; ! &xunit; ! &faq; ! </book> --- 1,134 ---- ! <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" ! "../../docbook/lib/docbook-dtd/docbookx.dtd" [ ! <!ENTITY start SYSTEM "start.xml"> ! <!ENTITY dynamic SYSTEM "dynamic.xml"> ! <!ENTITY static SYSTEM "static.xml"> ! <!ENTITY xunit SYSTEM "xunit.xml"> ! <!ENTITY faq SYSTEM "faq.xml"> ]> <book> ! <bookinfo> ! <title>DotNetMock - Mock Objects for .NET</title> ! ! <subtitle>Reference Documentation</subtitle> ! ! <releaseinfo>Version 0.7.6</releaseinfo> ! ! <pubdate>February 26, 2005 - (Work in progress)</pubdate> ! ! <authorgroup> ! <author> ! <firstname>Griffin</firstname> ! ! <surname>Caprio</surname> ! </author> ! ! <author> ! <firstname>Choy</firstname> ! ! <surname>Rim</surname> ! </author> ! </authorgroup> ! ! <legalnotice> ! <para>Copies of this document may be made for your own use and for ! distribution to others, provided that you do not charge any fee ! for such copies and further provided that each copy contains this ! Copyright Notice, whether distributed in print or ! electronically.</para> ! </legalnotice> ! </bookinfo> ! ! <toc></toc> ! ! <preface id="preface-ack"> ! <title>Acknowledgements</title> ! ! <para>This project and many others owe a debt of gratitude to Chris ! Bauer (of the <ulink url="http://www.hibernate.org/">Hibernate</ulink> ! project team), who prepared and adapted the DocBook-XSL software used ! to create Hibernate's reference guide, allowing us to create this ! guide.</para> ! </preface> ! ! <preface id="preface-intro"> ! <title>Introduction</title> ! ! <para>DotNetMock is a framework and library which facilitates the use ! of mock objects for unit testing on the .NET platform. It supports the ! dynamic creation of mock objects and the development of custom mock ! objects. It also contains a library of pre-built mock objects for ! typical purposes. It integrates with the NUnit, and MbUnit testing ! frameworks.</para> ! ! <section> ! <title>What is a Mock Object?</title> ! ! <para>From the <ulink ! url="http://www.mockobjects.com/Faq.html">mockobjects.com</ulink> ! website,</para> + <para><quote>A mock object is a "double agent" used to test the + behaviour of other objects. First, a mock object acts as a faux + implementation of an interface or class that mimics the external + behaviour of a true implementation. Second, a mock object observes + how other objects interact with its methods and compares actual + behaviour with preset expectations. When a discrepancy occurs, a + mock object can interrupt the test and report the anomaly. If the + discrepancy cannot be noted during the test, a verification method + called by the tester ensures that all expectations have been met + or failures reported.</quote></para> + <para>Mocking objects is a technique that enables the test-driven + developer to keep focus on the class he is currently developing by + providing something for his incomplete class to collaborate with. + This is a powerful and effective way to maintain momentum in a + test-driven environment.</para> + </section> + + <section> + <title>How Do I Use Mock Objects?</title> + + <para>The canonical approach to using mock objects involves the + following steps (also from <ulink + url="http://www.mockobjects.com/CommonStructureForTestsWithMockObjects.html">mockobjects.com</ulink>):</para> + + <para><orderedlist> + <listitem> + <para>Create context, including mock objects (common + context might be created in the setUp method).</para> + </listitem> + + <listitem> + <para>Define expectations on the mock objects.</para> + </listitem> + + <listitem id="mockobjects-canonical-steps-execute"> + <para>Execute the behaviour to be tested (often within + in an assert statement).</para> + </listitem> + + <listitem> + <para>Verify expectations.</para> + </listitem> + + <listitem> + <para>Assert additional post conditions not checked in + step 3.</para> + </listitem> + </orderedlist>We will see examples of this later in the + text.</para> + </section> + </preface> + + &start; + + &dynamic; + + &static; + + &xunit; + + &faq; + </book> \ No newline at end of file Index: dynamic.xml =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/doc/reference/src/dynamic.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dynamic.xml 13 Feb 2005 10:49:49 -0000 1.1 --- dynamic.xml 26 Feb 2005 19:41:20 -0000 1.2 *************** *** 1,11 **** <chapter id="dynamic"> ! <title>Dynamically Generated Mocks</title> <section id="dynamic-introduction"> ! <title>Introduction</title> ! <para> ! Dynamic mocks are mock objects created by dynamically implementing ! ... ! </para> ! </section> ! </chapter> --- 1,10 ---- + <?xml version="1.0" encoding="ISO-8859-1"?> <chapter id="dynamic"> ! <title>Dynamic Mocks</title> ! <section id="dynamic-introduction"> ! <title>Introduction</title> + <para>Dynamic mocks are mock objects created at runtime.</para> + </section> + </chapter> \ No newline at end of file |
From: Griffin C. <gc...@us...> - 2005-02-25 16:10:12
|
Update of /cvsroot/dotnetmock/dotnetmock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21122 Modified Files: DotNetMock.build Log Message: - Copied MbUnit Test code. Index: DotNetMock.build =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.build,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** DotNetMock.build 25 Feb 2005 02:31:07 -0000 1.25 --- DotNetMock.build 25 Feb 2005 16:10:00 -0000 1.26 *************** *** 216,222 **** </fileset> </copy> ! <copy todir="${src.dir}/DotNetMock.Examples.NUnitTests"> <fileset basedir="."> ! <include name="DotNetMock.Examples.NUnitTests/**/*.cs" /> </fileset> </copy> --- 216,222 ---- </fileset> </copy> ! <copy todir="${src.dir}/DotNetMock.Examples.MbUnitTests"> <fileset basedir="."> ! <include name="DotNetMock.Examples.MbUnitTests/**/*.cs" /> </fileset> </copy> |
From: Griffin C. <gc...@us...> - 2005-02-25 02:31:34
|
Update of /cvsroot/dotnetmock/dotnetmock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13727 Modified Files: CommonAssemblyInfo.cs DotNetMock.build StrongCommonAssemblyInfo.cs Log Message: - 0.7.5 release Index: StrongCommonAssemblyInfo.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/StrongCommonAssemblyInfo.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StrongCommonAssemblyInfo.cs 5 Feb 2005 21:14:25 -0000 1.2 --- StrongCommonAssemblyInfo.cs 25 Feb 2005 02:31:07 -0000 1.3 *************** *** 10,14 **** // Sets assembly version ! [assembly: AssemblyVersion("0.7.4.0")] // Delay signs assemblies --- 10,14 ---- // Sets assembly version ! [assembly: AssemblyVersion("0.7.5.0")] // Delay signs assemblies Index: DotNetMock.build =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.build,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** DotNetMock.build 25 Feb 2005 02:27:53 -0000 1.24 --- DotNetMock.build 25 Feb 2005 02:31:07 -0000 1.25 *************** *** 1,10 **** <project name=".NET Mock Objects master build file" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd"> <description>Master build file for .NET Mock Objects project</description> ! <property name="project.config" value="debug" /> <property name="debug.build" value="true" /> <property name="VisualStudioTemplates" value="VisualStudioTemplates" /> <property name="VisualStudioTemplates2003" value="VisualStudioTemplates2003" /> <property name="project.name" value="DotNetMock" /> ! <property name="version" value="0.7.4" /> <property name="build.dir" value="build/" /> <property name="dist.dir" value="dist" /> --- 1,10 ---- <project name=".NET Mock Objects master build file" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd"> <description>Master build file for .NET Mock Objects project</description> ! <property name="project.config" value="release" /> <property name="debug.build" value="true" /> <property name="VisualStudioTemplates" value="VisualStudioTemplates" /> <property name="VisualStudioTemplates2003" value="VisualStudioTemplates2003" /> <property name="project.name" value="DotNetMock" /> ! <property name="version" value="0.7.5" /> <property name="build.dir" value="build/" /> <property name="dist.dir" value="dist" /> Index: CommonAssemblyInfo.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/CommonAssemblyInfo.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CommonAssemblyInfo.cs 5 Feb 2005 21:12:50 -0000 1.1 --- CommonAssemblyInfo.cs 25 Feb 2005 02:31:07 -0000 1.2 *************** *** 10,13 **** // Sets assembly version ! [assembly: AssemblyVersion("0.7.4.0")] --- 10,13 ---- // Sets assembly version ! [assembly: AssemblyVersion("0.7.5.0")] |
From: Griffin C. <gc...@us...> - 2005-02-25 02:28:01
|
Update of /cvsroot/dotnetmock/dotnetmock/deployment In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12798/deployment Modified Files: DotNetMock.build Log Message: - Fixed build files for new release. Index: DotNetMock.build =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/deployment/DotNetMock.build,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DotNetMock.build 9 Jun 2004 21:58:05 -0000 1.1 --- DotNetMock.build 25 Feb 2005 02:27:53 -0000 1.2 *************** *** 1,5 **** <project name=".NET Mock Objects master build file"> <description>Master build file for .NET Mock Objects project</description> ! <property name="debug" value="false"/> <property name="VisualStudioTemplates" value="VisualStudioTemplates"/> <property name="VisualStudioTemplates2003" value="VisualStudioTemplates2003"/> --- 1,5 ---- <project name=".NET Mock Objects master build file"> <description>Master build file for .NET Mock Objects project</description> ! <property name="debug" value="true"/> <property name="VisualStudioTemplates" value="VisualStudioTemplates"/> <property name="VisualStudioTemplates2003" value="VisualStudioTemplates2003"/> *************** *** 13,19 **** </target> <target name="clean" description="Cleans project to pre-build state"> ! <delete failonerror="false"> ! <fileset basedir="${bin.dir}"> ! <includes name="DotNetMock.*"/> </fileset> </delete> --- 13,20 ---- </target> <target name="clean" description="Cleans project to pre-build state"> ! <delete> ! <fileset> ! <include name="${bin.dir}/DotNetMock*.dll"/> ! <include name="${bin.dir}/DotNetMock*.pdb"/> </fileset> </delete> *************** *** 22,115 **** <nunit2> <formatter type="Plain"/> ! <test assemblyname="${bin.dir}/DotNetMock.Tests.dll"/> ! <test assemblyname="${bin.dir}/DotNetMock.Framework.Tests.dll"/> ! <test assemblyname="${bin.dir}/DotNetMock.Examples.dll"/> </nunit2> </target> <target name="build" description="Builds .NET Mock Object modules" depends="init"> - <csc target="library" output="${bin.dir}/DotNetMock.Core.dll" debug="${debug}" doc="${doc.dir}\DotNetMock.Core.xml"> - <sources basedir="${src.dir}"> - <includes name="DotNetMock.Core/**/*.cs"/> - </sources> - </csc> <csc target="library" output="${bin.dir}/DotNetMock.dll" debug="${debug}" doc="${doc.dir}\DotNetMock.xml"> <sources basedir="${src.dir}"> ! <includes name="DotNetMock/**/*.cs"/> </sources> <references basedir="${bin.dir}"> ! <includes name="DotNetMock.Core.dll" /> </references> </csc> <csc target="library" output="${bin.dir}/DotNetMock.Tests.dll" debug="${debug}"> <sources basedir="${src.dir}"> ! <includes name="DotNetMock.Tests/**/*.cs"/> </sources> <references basedir="${bin.dir}"> ! <includes name="nunit.framework.dll"/> ! <includes name="DotNetMock.dll"/> </references> </csc> <csc target="library" output="${bin.dir}/DotNetMock.Framework.dll" debug="${debug}" doc="${doc.dir}\DotNetMock.Framework.xml"> <sources basedir="${src.dir}"> ! <includes name="DotNetMock.Framework/**/*.cs"/> </sources> <references basedir="${bin.dir}"> ! <includes name="DotNetMock.dll" /> </references> </csc> <csc target="library" output="${bin.dir}/DotNetMock.Framework.Tests.dll" debug="${debug}"> <sources basedir="${src.dir}"> ! <includes name="DotNetMock.Framework.Tests/**/*.cs"/> </sources> <references basedir="${bin.dir}"> ! <includes name="nunit.framework.dll"/> ! <includes name="DotNetMock.dll"/> ! <includes name="DotNetMock.Framework.dll"/> </references> </csc> <csc target="library" output="${bin.dir}/DotNetMock.Examples.dll" debug="${debug}"> <sources basedir="${src.dir}"> ! <includes name="DotNetMock.Examples/**/*.cs"/> </sources> ! <references basedir="${bin.dir}"> ! <includes name="nunit.framework.dll" /> ! <includes name="DotNetMock.dll"/> ! <includes name="DotNetMock.Framework.dll"/> </references> </csc> ! <csc target="library" output="${bin.dir}/DotNetMock.NUnit.dll" debug="${debug}" doc="${doc.dir}\DotNetMock.NUnit.xml"> <sources basedir="${src.dir}"> ! <includes name="DotNetMock.NUnit/**/*.cs"/> </sources> ! <references basedir="${bin.dir}"> ! <includes name="nunit.framework.dll"/> ! <includes name="DotNetMock.Core.dll"/> </references> </csc> ! <csc target="library" output="${bin.dir}/DotNetMock.csUnitNamespace.dll" debug="${debug}" doc="${doc.dir}\DotNetMock.csUnitNamespace.xml"> <sources basedir="${src.dir}"> ! <includes name="DotNetMock.csUnitNamespace/**/*.cs"/> </sources> ! <references basedir="${bin.dir}"> ! <includes name="csUnit.dll"/> ! <includes name="DotNetMock.Core.dll"/> </references> </csc> ! <csc target="library" output="${bin.dir}/DotNetMock.MbUnitNamespace.dll" debug="${debug}" doc="${doc.dir}\DotNetMock.MbUnitNamespace.xml"> <sources basedir="${src.dir}"> ! <includes name="DotNetMock.MbUnitNamespace/**/*.cs"/> </sources> ! <references basedir="${bin.dir}"> ! <includes name="MbUnit.Core.dll"/> ! <includes name="NGraphviz.Layout.dll"/> ! <includes name="QuickGraph.dll"/> ! <includes name="QuickGraph.Concepts.dll"/> ! <includes name="QuickGraph.Exceptions.dll"/> ! <includes name="QuickGraph.Predicates.dll"/> ! <includes name="QuickGraph.Collections.dll"/> ! <includes name="QuickGraph.Algorithms.dll"/> ! <includes name="QuickGraph.Serialization.dll"/> ! <includes name="QuickGraph.Representations.dll"/> ! <includes name="DotNetMock.Core.dll"/> </references> </csc> --- 23,110 ---- <nunit2> <formatter type="Plain"/> ! <test assemblyname="${bin.dir}/DotNetMock.Tests.dll" /> ! <test assemblyname="${bin.dir}/DotNetMock.TestFramework.Tests.dll" /> ! <test assemblyname="${bin.dir}/DotNetMock.Framework.Tests.dll" /> ! <test assemblyname="${bin.dir}/DotNetMock.Examples.NUnitTests.dll" /> </nunit2> </target> <target name="build" description="Builds .NET Mock Object modules" depends="init"> <csc target="library" output="${bin.dir}/DotNetMock.dll" debug="${debug}" doc="${doc.dir}\DotNetMock.xml"> <sources basedir="${src.dir}"> ! <include name="CommonAssemblyInfo.cs" /> ! <include name="DotNetMock/**/*.cs"/> </sources> <references basedir="${bin.dir}"> ! <include name="DotNetMock.Core.dll" /> </references> </csc> <csc target="library" output="${bin.dir}/DotNetMock.Tests.dll" debug="${debug}"> <sources basedir="${src.dir}"> ! <include name="DotNetMock.Tests/**/*.cs"/> </sources> <references basedir="${bin.dir}"> ! <include name="nunit.framework.dll"/> ! <include name="DotNetMock.dll"/> </references> </csc> <csc target="library" output="${bin.dir}/DotNetMock.Framework.dll" debug="${debug}" doc="${doc.dir}\DotNetMock.Framework.xml"> <sources basedir="${src.dir}"> ! <include name="CommonAssemblyInfo.cs" /> ! <include name="DotNetMock.Framework/**/*.cs"/> </sources> <references basedir="${bin.dir}"> ! <include name="DotNetMock.dll" /> </references> </csc> <csc target="library" output="${bin.dir}/DotNetMock.Framework.Tests.dll" debug="${debug}"> <sources basedir="${src.dir}"> ! <include name="DotNetMock.Framework.Tests/**/*.cs"/> </sources> <references basedir="${bin.dir}"> ! <include name="nunit.framework.dll"/> ! <include name="DotNetMock.dll"/> ! <include name="DotNetMock.Framework.dll"/> </references> </csc> <csc target="library" output="${bin.dir}/DotNetMock.Examples.dll" debug="${debug}"> <sources basedir="${src.dir}"> ! <include name="DotNetMock.Examples/**/*.cs"/> </sources> ! <references basedir="."> ! <include name="${bin.dir}/nunit.framework.dll" /> ! <include name="${bin.dir}/DotNetMock.dll"/> ! <include name="${bin.dir}/DotNetMock.Framework.dll"/> </references> </csc> ! <csc target="library" output="${bin.dir}/DotNetMock.Examples.NUnitTests.dll" debug="${debug}"> <sources basedir="${src.dir}"> ! <include name="DotNetMock.Examples.NUnitTests/**/*.cs" /> </sources> ! <references basedir="."> ! <include name="${bin.dir}/DotNetMock.Examples.dll" /> ! <include name="${bin.dir}/DotNetMock.dll" /> ! <include name="${bin.dir}/DotNetMock.Framework.dll" /> ! <include name="${bin.dir}/nunit.framework.dll" /> </references> </csc> ! <csc target="library" output="${bin.dir}/DotNetMock.TestFramework.Tests.dll" debug="${debug}"> <sources basedir="${src.dir}"> ! <include name="DotNetMock.TestFramework.Tests/**/*.cs" /> </sources> ! <references basedir="."> ! <include name="${bin.dir}/nunit.framework.dll" /> ! <include name="${bin.dir}/DotNetMock.dll" /> </references> </csc> ! <csc target="library" output="${bin.dir}/DotNetMock.Examples.MbUnitTests.dll" debug="${debug}"> <sources basedir="${src.dir}"> ! <include name="DotNetMock.Examples.MbUnitTests/**/*.cs" /> </sources> ! <references basedir="."> ! <include name="${bin.dir}/DotNetMock.Examples.dll" /> ! <include name="${bin.dir}/DotNetMock.dll" /> ! <include name="${bin.dir}/DotNetMock.Framework.dll" /> ! <include name="${bin.dir}/MbUnit.Core.dll" /> ! <include name="${bin.dir}/MbUnit.Framework.dll" /> </references> </csc> *************** *** 119,124 **** <ndoc failonerror="false"> <assemblies basedir="."> ! <includes name="build/DotNetMock.dll"/> ! <includes name="build/DotNetMock.Framework.dll"/> </assemblies> <documenters> --- 114,119 ---- <ndoc failonerror="false"> <assemblies basedir="."> ! <include name="build/DotNetMock.dll"/> ! <include name="build/DotNetMock.Framework.dll"/> </assemblies> <documenters> *************** *** 154,168 **** <copy todir="${items.dir}"> <fileset basedir="${VisualStudioTemplates}/CSharpProjectItems"> ! <includes name="**/*.vsz"/> </fileset> </copy> <copy todir="${items.dir}/LocalProjectItems/Code"> <fileset basedir="${VisualStudioTemplates}/CSharpProjectItems/LocalProjectItems/Code"> ! <includes name="**/*.vsdir"/> </fileset> </copy> <copy todir="${wizards.dir}"> <fileset basedir="${VisualStudioTemplates}/VC#Wizards"> ! <includes name="**/*"/> </fileset> </copy> --- 149,163 ---- <copy todir="${items.dir}"> <fileset basedir="${VisualStudioTemplates}/CSharpProjectItems"> ! <include name="**/*.vsz"/> </fileset> </copy> <copy todir="${items.dir}/LocalProjectItems/Code"> <fileset basedir="${VisualStudioTemplates}/CSharpProjectItems/LocalProjectItems/Code"> ! <include name="**/*.vsdir"/> </fileset> </copy> <copy todir="${wizards.dir}"> <fileset basedir="${VisualStudioTemplates}/VC#Wizards"> ! <include name="**/*"/> </fileset> </copy> *************** *** 173,201 **** <copy todir="${items.dir}"> <fileset basedir="${VisualStudioTemplates2003}/CSharpProjectItems"> ! <includes name="**/*.vsz"/> </fileset> </copy> <copy todir="${items.dir}/LocalProjectItems/Code"> <fileset basedir="${VisualStudioTemplates2003}/CSharpProjectItems/LocalProjectItems/Code"> ! <includes name="**/*.vsdir"/> </fileset> </copy> <copy todir="${wizards.dir}"> <fileset basedir="${VisualStudioTemplates2003}/VC#Wizards"> ! <includes name="**/*"/> </fileset> </copy> </target> - <target name="BuildProfilingAssembly" description="Creates an Interop Assembly for the .NET Profiling API"> - <tlbimp typelib="lib/CorProfilingAPI/corprof.tlb" - output="lib/Interop.CorProfilingLib.dll" - keyfile="lib/Interop.CorProfilingLib.key" - primary="true" - unsafe="true" - /> - </target> - <target name="RunFxCop" description="Runs FxCop on the DotNetMock assemblies" depends="build"> - <exec program="FxCopCmd.Exe" commandline="/p:FxCop/DotNetMock.FxCop /out:FxCop/DotNetMock.results /u" /> - <style style="FxCop/FxCopReport.xsl" in="FxCop/DotNetMock.results" out="FxCop/DotNetMock.results.html" /> - </target> </project> --- 168,184 ---- <copy todir="${items.dir}"> <fileset basedir="${VisualStudioTemplates2003}/CSharpProjectItems"> ! <include name="**/*.vsz"/> </fileset> </copy> <copy todir="${items.dir}/LocalProjectItems/Code"> <fileset basedir="${VisualStudioTemplates2003}/CSharpProjectItems/LocalProjectItems/Code"> ! <include name="**/*.vsdir"/> </fileset> </copy> <copy todir="${wizards.dir}"> <fileset basedir="${VisualStudioTemplates2003}/VC#Wizards"> ! <include name="**/*"/> </fileset> </copy> </target> </project> |
From: Griffin C. <gc...@us...> - 2005-02-25 02:28:01
|
Update of /cvsroot/dotnetmock/dotnetmock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12798 Modified Files: DotNetMock.build Log Message: - Fixed build files for new release. Index: DotNetMock.build =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.build,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** DotNetMock.build 16 Feb 2005 10:59:23 -0000 1.23 --- DotNetMock.build 25 Feb 2005 02:27:53 -0000 1.24 *************** *** 175,178 **** --- 175,184 ---- </fileset> </copy> + + <copy todir="${src.dir}"> + <fileset basedir="."> + <include name="CommonAssemblyInfo.cs" /> + </fileset> + </copy> <copy todir="${src.dir}/DotNetMock"> <fileset basedir="DotNetMock"> *************** *** 200,203 **** --- 206,224 ---- </fileset> </copy> + <copy todir="${src.dir}/DotNetMock.Examples.NUnitTests"> + <fileset basedir="."> + <include name="DotNetMock.Examples.NUnitTests/**/*.cs" /> + </fileset> + </copy> + <copy todir="${src.dir}/DotNetMock.TestFramework.Tests"> + <fileset basedir="."> + <include name="DotNetMock.TestFramework.Tests/**/*.cs" /> + </fileset> + </copy> + <copy todir="${src.dir}/DotNetMock.Examples.NUnitTests"> + <fileset basedir="."> + <include name="DotNetMock.Examples.NUnitTests/**/*.cs" /> + </fileset> + </copy> <copy todir="${package.dir}/${VisualStudioTemplates}"> <fileset basedir="${VisualStudioTemplates}"> |