Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock In directory sc8-pr-cvs1:/tmp/cvs-serv20364/DotNetMock Modified Files: AbstractExpectation.cs AbstractExpectationCollection.cs AssemblyInfo.cs DotNetMock.csproj ExpectationArrayList.cs ExpectationBool.cs ExpectationCounter.cs ExpectationString.cs ExpectationType.cs ExpectationValue.cs IExpectation.cs IExpectationCollection.cs IVerifiable.cs MockObject.cs NullObject.cs ReturnValue.cs Verifier.cs verifyException.cs Log Message: Comments and multiple changes Index: AbstractExpectation.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/AbstractExpectation.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AbstractExpectation.cs 13 Jan 2003 04:03:56 -0000 1.8 --- AbstractExpectation.cs 1 Apr 2003 01:43:56 -0000 1.9 *************** *** 1,2 **** --- 1,51 ---- + /* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see <http://www.apache.org/>. + * + */ + using System; *************** *** 16,22 **** /// </summary> protected string name = null; - /// <summary> /// Default Constructor for AbstractExpectation /// </summary> /// <param name="name">Name of this Expectation</param> --- 65,77 ---- /// </summary> protected string name = null; /// <summary> /// Default Constructor for AbstractExpectation + /// </summary> + protected AbstractExpectation() + { + this.name = "AbstractExpectation"; + } + /// <summary> + /// Constructor for AbstractExpectation that sets the name of the Expectation /// </summary> /// <param name="name">Name of this Expectation</param> Index: AbstractExpectationCollection.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/AbstractExpectationCollection.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AbstractExpectationCollection.cs 7 Feb 2003 03:13:40 -0000 1.7 --- AbstractExpectationCollection.cs 1 Apr 2003 01:43:56 -0000 1.8 *************** *** 1,2 **** --- 1,51 ---- + /* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see <http://www.apache.org/>. + * + */ + using System; using System.Collections; *************** *** 11,17 **** --- 60,71 ---- public abstract class AbstractExpectationCollection : AbstractExpectation, IExpectationCollection { + /// <summary> /// Default Constructor /// </summary> + protected AbstractExpectationCollection() : base() {} + /// <summary> + /// Constructor that takes in the name of the Expectation Collection + /// </summary> /// <param name="name">Name for AbstractExpectationCollection</param> protected AbstractExpectationCollection(string name) : base(name) {} *************** *** 20,34 **** /// </summary> /// <param name="actual">Values to check</param> ! abstract protected void CheckImmediateValues(object actual); /// <summary> /// Returns Actual Collection /// </summary> /// <returns>Actual Collection</returns> ! abstract public IList ActualCollection {get;} /// <summary> /// Returns Expected Collection /// </summary> /// <returns>Expected Collection</returns> ! abstract public IList ExpectedCollection {get;} /// <summary> /// Adds value to actual collection --- 74,88 ---- /// </summary> /// <param name="actual">Values to check</param> ! protected abstract void CheckImmediateValues(object actual); /// <summary> /// Returns Actual Collection /// </summary> /// <returns>Actual Collection</returns> ! public abstract IList ActualCollection {get;} /// <summary> /// Returns Expected Collection /// </summary> /// <returns>Expected Collection</returns> ! public abstract IList ExpectedCollection {get;} /// <summary> /// Adds value to actual collection *************** *** 89,93 **** /// Adds several values to the expected collection /// </summary> ! /// <param name="actualMany">Values to add</param> public void AddExpectedMany(object[] expectedMany) { --- 143,147 ---- /// Adds several values to the expected collection /// </summary> ! /// <param name="expectedMany">Values to add</param> public void AddExpectedMany(object[] expectedMany) { *************** *** 100,104 **** /// Adds several values to the expected collection /// </summary> ! /// <param name="actualMany">Values to add</param> public void AddExpectedMany(IEnumerable expectedMany) { --- 154,158 ---- /// Adds several values to the expected collection /// </summary> ! /// <param name="expectedMany">Values to add</param> public void AddExpectedMany(IEnumerable expectedMany) { *************** *** 112,116 **** /// Adds several values to the expected collection /// </summary> ! /// <param name="actualMany">Values to add</param> public void AddExpectedMany(IList expectedMany) { --- 166,170 ---- /// Adds several values to the expected collection /// </summary> ! /// <param name="expectedMany">Values to add</param> public void AddExpectedMany(IList expectedMany) { *************** *** 125,129 **** public override void ClearActual() { ! this.ExpectedCollection.Clear(); } /// <summary> --- 179,183 ---- public override void ClearActual() { ! this.ActualCollection.Clear(); } /// <summary> *************** *** 135,151 **** } /// <summary> - /// Sets expectations to nothing - /// </summary> - public override void ExpectNothing() - { - ClearExpected(); - this.HasExpectations = true; - } - /// <summary> /// Verifies expectation collection /// </summary> public override void Verify() { ! NUnit.Framework.Assertion.AssertEquals(this.ExpectedCollection.Count, this.ActualCollection.Count); for (int i = 0; i < this.ActualCollection.Count; i++) { --- 189,197 ---- } /// <summary> /// Verifies expectation collection /// </summary> public override void Verify() { ! NUnit.Framework.Assertion.AssertEquals("Expectation Count's do not equal.", this.ExpectedCollection.Count, this.ActualCollection.Count); for (int i = 0; i < this.ActualCollection.Count; i++) { Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/AssemblyInfo.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AssemblyInfo.cs 25 Mar 2003 03:02:07 -0000 1.7 --- AssemblyInfo.cs 1 Apr 2003 01:43:56 -0000 1.8 *************** *** 7,11 **** [assembly:CLSCompliant(true)] ! // Marks COM Visibility to false. we don't want COM clients to use this assembly [assembly:ComVisible(false)] // --- 7,11 ---- [assembly:CLSCompliant(true)] ! // Marks COM Visibility to false. We don't want COM clients to use this assembly [assembly:ComVisible(false)] // Index: DotNetMock.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/DotNetMock.csproj,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DotNetMock.csproj 11 Mar 2003 22:45:34 -0000 1.10 --- DotNetMock.csproj 1 Apr 2003 01:43:56 -0000 1.11 *************** *** 138,141 **** --- 138,146 ---- /> <File + RelPath = "IMockObject.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "IVerifiable.cs" SubType = "Code" Index: ExpectationArrayList.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ExpectationArrayList.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ExpectationArrayList.cs 13 Jan 2003 04:03:57 -0000 1.8 --- ExpectationArrayList.cs 1 Apr 2003 01:43:56 -0000 1.9 *************** *** 1,2 **** --- 1,51 ---- + /* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see <http://www.apache.org/>. + * + */ + namespace DotNetMock { *************** *** 44,48 **** int size = _actualArrayList.Count; NUnit.Framework.Assertion.Assert(_expectedArrayList.Count >= size); ! NUnit.Framework.Assertion.AssertEquals(_expectedArrayList[size -1], actual); } } --- 93,97 ---- int size = _actualArrayList.Count; NUnit.Framework.Assertion.Assert(_expectedArrayList.Count >= size); ! NUnit.Framework.Assertion.AssertEquals(_expectedArrayList[size - 1], actual); } } Index: ExpectationBool.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ExpectationBool.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ExpectationBool.cs 26 Feb 2003 17:18:18 -0000 1.1 --- ExpectationBool.cs 1 Apr 2003 01:43:56 -0000 1.2 *************** *** 1,2 **** --- 1,51 ---- + /* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see <http://www.apache.org/>. + * + */ + using System; *************** *** 46,51 **** public bool Actual { ! get { return _actualBool; } ! set { _actualBool = value;} } /// <summary> --- 95,110 ---- public bool Actual { ! get ! { ! return _actualBool; ! } ! set ! { ! _actualBool = value; ! if (ShouldCheckImmediate) ! { ! Verify(); ! } ! } } /// <summary> Index: ExpectationCounter.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ExpectationCounter.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ExpectationCounter.cs 7 Feb 2003 03:13:41 -0000 1.8 --- ExpectationCounter.cs 1 Apr 2003 01:43:56 -0000 1.9 *************** *** 1,3 **** ! namespace DotNetMock { using System; using NUnit.Framework; --- 1,53 ---- ! /* ! * ============================================================================ ! * The Apache Software License, Version 1.1 ! * ============================================================================ ! * ! * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. ! * ! * Redistribution and use in source and binary forms, with or without modifica- ! * tion, are permitted provided that the following conditions are met: ! * ! * 1. Redistributions of source code must retain the above copyright notice, ! * this list of conditions and the following disclaimer. ! * ! * 2. Redistributions in binary form must reproduce the above copyright notice, ! * this list of conditions and the following disclaimer in the documentation ! * and/or other materials provided with the distribution. ! * ! * 3. The end-user documentation included with the redistribution, if any, must ! * include the following acknowledgment: "This product includes software ! * developed by the Apache Software Foundation (http://www.apache.org/)." ! * Alternately, this acknowledgment may appear in the software itself, if ! * and wherever such third-party acknowledgments normally appear. ! * ! * 4. The names "log4j" and "Apache Software Foundation" must not be used to ! * endorse or promote products derived from this software without prior ! * written permission. For written permission, please contact ! * ap...@ap.... ! * ! * 5. Products derived from this software may not be called "Apache", nor may ! * "Apache" appear in their name, without prior written permission of the ! * Apache Software Foundation. ! * ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, ! * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND ! * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ! * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, ! * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- ! * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS ! * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ! * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ! * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ! * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! * ! * This software consists of voluntary contributions made by many individuals ! * on behalf of the Apache Software Foundation. For more information on the ! * Apache Software Foundation, please see <http://www.apache.org/>. ! * ! */ ! ! namespace DotNetMock ! { using System; using NUnit.Framework; Index: ExpectationString.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ExpectationString.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ExpectationString.cs 7 Feb 2003 03:13:41 -0000 1.6 --- ExpectationString.cs 1 Apr 2003 01:43:56 -0000 1.7 *************** *** 1,5 **** namespace DotNetMock { - using System; /// <summary> /// Expectation String implementation. Extends <c>AbstractExpectaion</c> --- 1,53 ---- + /* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see <http://www.apache.org/>. + * + */ + using System; namespace DotNetMock { /// <summary> /// Expectation String implementation. Extends <c>AbstractExpectaion</c> *************** *** 10,13 **** --- 58,66 ---- private string _actualString = null; private string _expectedString = null; + + /// <summary> + /// Default Constructor for ExpectationString. Set the name for this Expectation + /// </summary> + /// <param name="name">Name of this Expectation</param> public ExpectationString(string name) : base(name) { *************** *** 27,30 **** --- 80,87 ---- { this._actualString = value; + if (ShouldCheckImmediate) + { + Verify(); + } } } Index: ExpectationType.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ExpectationType.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ExpectationType.cs 26 Feb 2003 17:18:19 -0000 1.1 --- ExpectationType.cs 1 Apr 2003 01:43:56 -0000 1.2 *************** *** 1,2 **** --- 1,51 ---- + /* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see <http://www.apache.org/>. + * + */ + using System; Index: ExpectationValue.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ExpectationValue.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ExpectationValue.cs 26 Mar 2003 03:14:48 -0000 1.11 --- ExpectationValue.cs 1 Apr 2003 01:43:56 -0000 1.12 *************** *** 1,5 **** namespace DotNetMock { - using System; /// <summary> /// Expectation Value implementation. Extends <c>AbstractExpectation</c> --- 1,54 ---- + /* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see <http://www.apache.org/>. + * + */ + + using System; namespace DotNetMock { /// <summary> /// Expectation Value implementation. Extends <c>AbstractExpectation</c> *************** *** 11,15 **** private Object _expectedValue = null; ! public ExpectationValue(string name) : base(name) { ClearActual(); } --- 60,69 ---- private Object _expectedValue = null; ! /// <summary> ! /// Default Constructor for ExpectationValue. Set the name for this Expectation ! /// </summary> ! /// <param name="name">Name of this Expectation</param> ! public ExpectationValue(string name) : base(name) ! { ClearActual(); } Index: IExpectation.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/IExpectation.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IExpectation.cs 13 Jan 2003 04:03:57 -0000 1.2 --- IExpectation.cs 1 Apr 2003 01:43:56 -0000 1.3 *************** *** 1,5 **** namespace DotNetMock { - using System; /// <summary> /// Interface that all expectation implement. Also implements the Verifiable interface --- 1,54 ---- + /* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see <http://www.apache.org/>. + * + */ + using System; + namespace DotNetMock { /// <summary> /// Interface that all expectation implement. Also implements the Verifiable interface Index: IExpectationCollection.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/IExpectationCollection.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IExpectationCollection.cs 13 Jan 2003 04:03:57 -0000 1.2 --- IExpectationCollection.cs 1 Apr 2003 01:43:56 -0000 1.3 *************** *** 1,6 **** namespace DotNetMock { - using System; - using System.Collections; /// <summary> /// IExpectationCollection interface. Interface for all collection based Expectations. Implements <c>IExpectation</c> interface --- 1,55 ---- + /* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see <http://www.apache.org/>. + * + */ + using System; + using System.Collections; + namespace DotNetMock { /// <summary> /// IExpectationCollection interface. Interface for all collection based Expectations. Implements <c>IExpectation</c> interface *************** *** 22,31 **** /// Adds a Collection that implements the IEnumerable interface to actual collection /// </summary> ! /// <param name="actualMany"></param> void AddActualMany(IEnumerable actualMany); /// <summary> /// Adds the elements of an object that implements IList to the actual collection /// </summary> ! /// <param name="actualMany"></param> void AddActualMany(IList actualMany); --- 71,80 ---- /// Adds a Collection that implements the IEnumerable interface to actual collection /// </summary> ! /// <param name="actualMany">Enumerator full of objects to add to the actual collection</param> void AddActualMany(IEnumerable actualMany); /// <summary> /// Adds the elements of an object that implements IList to the actual collection /// </summary> ! /// <param name="actualMany">List of objects to add to the actual collection</param> void AddActualMany(IList actualMany); *************** *** 33,52 **** /// Adds object to expected collection /// </summary> ! /// <param name="expected"></param> void AddExpected(object expected); /// <summary> /// Adds an array of objects to expected collection /// </summary> ! /// <param name="expectedMany"></param> void AddExpectedMany(object[] expectedMany); /// <summary> /// Adds a Collection that implements the IEnumerable interface to expected collection /// </summary> ! /// <param name="expectedMany"></param> void AddExpectedMany(IEnumerable expectedMany); /// <summary> /// Adds the elements of an object that implements IList to the expected collection /// </summary> ! /// <param name="expectedMany"></param> void AddExpectedMany(IList expectedMany); } --- 82,101 ---- /// Adds object to expected collection /// </summary> ! /// <param name="expected">Object to add to the expected collection</param> void AddExpected(object expected); /// <summary> /// Adds an array of objects to expected collection /// </summary> ! /// <param name="expectedMany">Objects to add to the expected collection</param> void AddExpectedMany(object[] expectedMany); /// <summary> /// Adds a Collection that implements the IEnumerable interface to expected collection /// </summary> ! /// <param name="expectedMany">Enumerator full of objects to add to the expected collection</param> void AddExpectedMany(IEnumerable expectedMany); /// <summary> /// Adds the elements of an object that implements IList to the expected collection /// </summary> ! /// <param name="expectedMany">IList to add to the expected collection</param> void AddExpectedMany(IList expectedMany); } Index: IVerifiable.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/IVerifiable.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IVerifiable.cs 13 Jan 2003 04:03:57 -0000 1.2 --- IVerifiable.cs 1 Apr 2003 01:43:56 -0000 1.3 *************** *** 1,2 **** --- 1,51 ---- + /* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see <http://www.apache.org/>. + * + */ + namespace DotNetMock { Index: MockObject.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/MockObject.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MockObject.cs 26 Mar 2003 03:14:48 -0000 1.10 --- MockObject.cs 1 Apr 2003 01:43:56 -0000 1.11 *************** *** 1,14 **** namespace DotNetMock { - using System; - using NUnit.Framework; /// <summary> ! /// Base Mock Object. All custom Mock Objects should extend this object. /// </summary> /// <remarks/> - - // TODO: Extend MarshalByRefObject to take care of remoting issues. [Serializable()] ! public class MockObject : MarshalByRefObject, IVerifiable { /// <summary> --- 1,62 ---- + /* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see <http://www.apache.org/>. + * + */ + + using System; + using NUnit.Framework; + namespace DotNetMock { /// <summary> ! /// Base Mock Object. All custom Mock Objects can extend this object. /// </summary> /// <remarks/> [Serializable()] ! public class MockObject : MarshalByRefObject, IMockObject { /// <summary> *************** *** 34,39 **** /// </summary> /// <param name="message">Message to display on failure.</param> ! /// <param name="object1">First Object.</param> ! /// <param name="object2">Second Object.</param> public void AssertEquals(string message, Object expectedObject, Object actualObject) { --- 82,89 ---- /// </summary> /// <param name="message">Message to display on failure.</param> ! /// <param name="expectedObject">First Object.</param> ! /// <param name="actualObject">Second Object.</param> ! // TODO: Remove in version 0.5 ! [Obsolete("Use NUnit.Framework.Assertion.AssertEquals instead.")] public void AssertEquals(string message, Object expectedObject, Object actualObject) { *************** *** 53,56 **** --- 103,108 ---- /// <param name="message">Message to display on failure.</param> /// <param name="condition">Condition to evaluate.</param> + // TODO: Remove in version 0.5 + [Obsolete("Use NUnit.Framework.Assertion.Assert instead.")] public void AssertTrue(string message, bool condition) { *************** *** 61,64 **** --- 113,118 ---- /// </summary> /// <param name="message">Message to display.</param> + // TODO: Remove in version 0.5 + [Obsolete("Use NUnit.Framework.Assertion.Fail instead.")] public void Fail(string message) { *************** *** 72,75 **** --- 126,145 ---- Verifier.Verify(this); } + + /// <summary> + /// Gets/Sets the Name of the Mock Object + /// </summary> + public string MockName + { + get + { + return name; + } + set + { + name = value; + } + } + } } Index: NullObject.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/NullObject.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullObject.cs 26 Feb 2003 17:18:21 -0000 1.1 --- NullObject.cs 1 Apr 2003 01:43:56 -0000 1.2 *************** *** 1,5 **** namespace DotNetMock { ! using System; /// <summary> /// This represents a Null Object. --- 1,55 ---- + /* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see <http://www.apache.org/>. + * + */ + using System; + namespace DotNetMock { ! /// <summary> /// This represents a Null Object. *************** *** 10,17 **** private string _name; public NullObject() { _name = "null"; } ! public NullObject(string name) { _name = name; } --- 60,75 ---- private string _name; + /// <summary> + /// Default Constructor. Sets the name of this object to "null" + /// </summary> public NullObject() { _name = "null"; } ! /// <summary> ! /// Default Constructor for NullObject. Set the name for this Object ! /// </summary> ! /// <param name="name">Name of this Object</param> ! public NullObject(string name) ! { _name = name; } *************** *** 40,43 **** --- 98,115 ---- { return _name.GetHashCode(); + } + /// <summary> + /// Gets/Sets the name of this Null Object + /// </summary> + public string Name + { + get + { + return _name; + } + set + { + _name = value; + } } } Index: ReturnValue.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ReturnValue.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ReturnValue.cs 13 Jan 2003 04:03:57 -0000 1.4 --- ReturnValue.cs 1 Apr 2003 01:43:56 -0000 1.5 *************** *** 1,2 **** --- 1,51 ---- + /* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "log4j" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + ... [truncated message content] |