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-01-01 22:32:55
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13904/DotNetMock.Framework/Data Modified Files: Tag: RFE_1001778 MockCommand.cs MockDbDataAdapter.cs Log Message: - Merged changes from HEAD Index: MockDbDataAdapter.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Data/MockDbDataAdapter.cs,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** MockDbDataAdapter.cs 28 Aug 2004 19:08:58 -0000 1.6 --- MockDbDataAdapter.cs 1 Jan 2005 22:32:06 -0000 1.6.2.1 *************** *** 260,298 **** #region IDataAdapter Members ! ! public ITableMappingCollection TableMappings ! { ! get ! { ! // TODO: Add MockDbDataAdapter.TableMappings getter implementation ! return null; ! } ! } ! ! public System.Data.MissingSchemaAction MissingSchemaAction ! { ! get ! { ! // TODO: Add MockDbDataAdapter.MissingSchemaAction getter implementation ! return new System.Data.MissingSchemaAction (); ! } ! set ! { ! // TODO: Add MockDbDataAdapter.MissingSchemaAction setter implementation ! } ! } ! ! public System.Data.MissingMappingAction MissingMappingAction ! { ! get ! { ! // TODO: Add MockDbDataAdapter.MissingMappingAction getter implementation ! return new System.Data.MissingMappingAction (); ! } ! set ! { ! // TODO: Add MockDbDataAdapter.MissingMappingAction setter implementation ! } ! } #endregion --- 260,264 ---- #region IDataAdapter Members ! #endregion Index: MockCommand.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Data/MockCommand.cs,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -C2 -d -r1.17 -r1.17.2.1 *** MockCommand.cs 26 Jun 2004 20:23:13 -0000 1.17 --- MockCommand.cs 1 Jan 2005 22:32:05 -0000 1.17.2.1 *************** *** 337,340 **** --- 337,344 ---- GC.SuppressFinalize(this); } + /// <summary> + /// Releases the unmanaged resources used by the MockCommand and optionally releases the managed resources. + /// </summary> + /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> protected virtual void Dispose(bool disposing) { *************** *** 346,352 **** } /// <summary> ! /// Releases the unmanaged resources used by the MockCommand and optionally releases the managed resources. /// </summary> - /// <param name="dispose">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> ~MockCommand() { --- 350,355 ---- } /// <summary> ! /// Object Finalizer /// </summary> ~MockCommand() { |
From: Griffin C. <gc...@us...> - 2005-01-01 22:32:54
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.MbUnitNamespace In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13904/DotNetMock.MbUnitNamespace Modified Files: Tag: RFE_1001778 DotNetMock.MbUnitNamespace.csproj Log Message: - Merged changes from HEAD Index: DotNetMock.MbUnitNamespace.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.MbUnitNamespace/DotNetMock.MbUnitNamespace.csproj,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** DotNetMock.MbUnitNamespace.csproj 11 Jul 2004 03:24:36 -0000 1.2 --- DotNetMock.MbUnitNamespace.csproj 1 Jan 2005 22:32:06 -0000 1.2.2.1 *************** *** 30,34 **** ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" --- 30,34 ---- ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "bin\Debug\.xml" DebugSymbols = "true" FileAlignment = "4096" *************** *** 40,44 **** RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" WarningLevel = "4" /> --- 40,44 ---- RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "true" WarningLevel = "4" /> |
From: Griffin C. <gc...@us...> - 2005-01-01 22:32:54
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13904/DotNetMock.Tests/Dynamic Modified Files: Tag: RFE_1001778 PredicateTests.cs Log Message: - Merged changes from HEAD Index: PredicateTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/PredicateTests.cs,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** PredicateTests.cs 9 Oct 2004 21:14:12 -0000 1.9 --- PredicateTests.cs 1 Jan 2005 22:32:07 -0000 1.9.2.1 *************** *** 230,234 **** public void Delegate() { ! p = new Predicate(new Predicate.Method(myEval)); myFlag = false; Assertion.Assert(p.Eval(null)); --- 230,234 ---- public void Delegate() { ! p = new Predicate(new Predicate.EvaluationMethod(myEval)); myFlag = false; Assertion.Assert(p.Eval(null)); |
From: Griffin C. <gc...@us...> - 2005-01-01 22:32:51
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.NUnit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13904/DotNetMock.NUnit Modified Files: Tag: RFE_1001778 DotNetMock.NUnit.csproj Log Message: - Merged changes from HEAD Index: DotNetMock.NUnit.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.NUnit/DotNetMock.NUnit.csproj,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** DotNetMock.NUnit.csproj 19 Jul 2004 22:34:47 -0000 1.2 --- DotNetMock.NUnit.csproj 1 Jan 2005 22:32:06 -0000 1.2.2.1 *************** *** 30,34 **** ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" --- 30,34 ---- ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "bin\Debug\.xml" DebugSymbols = "true" FileAlignment = "4096" *************** *** 40,44 **** RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" WarningLevel = "4" /> --- 40,44 ---- RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "true" WarningLevel = "4" /> |
From: Griffin C. <gc...@us...> - 2005-01-01 22:32:49
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13904/DotNetMock.Core Modified Files: Tag: RFE_1001778 DotNetMock.Core.csproj Log Message: - Merged changes from HEAD Index: DotNetMock.Core.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Core/DotNetMock.Core.csproj,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** DotNetMock.Core.csproj 9 Oct 2004 21:14:11 -0000 1.3 --- DotNetMock.Core.csproj 1 Jan 2005 22:32:05 -0000 1.3.2.1 *************** *** 30,34 **** ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" --- 30,34 ---- ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "bin\Debug\.xml" DebugSymbols = "true" FileAlignment = "4096" *************** *** 40,44 **** RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" WarningLevel = "4" /> --- 40,44 ---- RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "true" WarningLevel = "4" /> |
From: Griffin C. <gc...@us...> - 2005-01-01 22:32:46
|
Update of /cvsroot/dotnetmock/dotnetmock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13904 Modified Files: Tag: RFE_1001778 .cvsignore Log Message: - Merged changes from HEAD Index: .cvsignore =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/.cvsignore,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** .cvsignore 20 Dec 2004 08:25:39 -0000 1.1.2.1 --- .cvsignore 1 Jan 2005 22:32:05 -0000 1.1.2.2 *************** *** 1,2 **** --- 1,6 ---- DotNetMock.suo + CloverBuild + _ReSharper.DotNetMock build + dist + report |
From: Griffin C. <gc...@us...> - 2005-01-01 22:32:20
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13904/DotNetMock/Dynamic/Predicates Modified Files: Tag: RFE_1001778 AndPredicate.cs IsAnything.cs IsCloseTo.cs IsEqual.cs IsEqualIgnoreCase.cs IsEqualIgnoreWhiteSpace.cs IsIn.cs IsMatch.cs IsNull.cs IsTypeOf.cs NotEqual.cs NotIn.cs NotNull.cs NotPredicate.cs OrPredicate.cs Predicate.cs Log Message: - Merged changes from HEAD Index: AndPredicate.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/AndPredicate.cs,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** AndPredicate.cs 24 Jul 2004 13:45:14 -0000 1.3 --- AndPredicate.cs 1 Jan 2005 22:32:09 -0000 1.3.2.1 *************** *** 1,10 **** - using System; - namespace DotNetMock.Dynamic.Predicates { public class AndPredicate : IPredicate { private IPredicate p1, p2; ! public AndPredicate(IPredicate p1, IPredicate p2) { --- 1,15 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// Represets a <see cref="IPredicate"/> that expects a value to satisfy two predicates. + /// </summary> public class AndPredicate : IPredicate { private IPredicate p1, p2; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="p1">first <see cref="IPredicate"/></param> ! /// <param name="p2">first <see cref="IPredicate"/></param> public AndPredicate(IPredicate p1, IPredicate p2) { *************** *** 12,16 **** this.p2 = p2; } ! public bool Eval(object currentValue) { --- 17,25 ---- this.p2 = p2; } ! /// <summary> ! /// Evaluates the input value against both <see cref="IPredicate"/>s ! /// </summary> ! /// <param name="currentValue">Value to evaluate</param> ! /// <returns>True if the input value satisfies both <see cref="IPredicate"/> instances</returns> public bool Eval(object currentValue) { Index: IsTypeOf.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsTypeOf.cs,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** IsTypeOf.cs 1 Apr 2003 01:43:57 -0000 1.2 --- IsTypeOf.cs 1 Jan 2005 22:32:09 -0000 1.2.4.1 *************** *** 1,67 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class IsTypeOf : IPredicate { ! private Type type; ! public IsTypeOf(Type type) { ! this.type = type; } ! public bool Eval(object currentValue) { ! return currentValue == null ? false : type.IsAssignableFrom(currentValue.GetType()); } } --- 1,28 ---- using System; namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that evaluates the input value against the expected <see cref="Type"/> + /// </summary> public class IsTypeOf : IPredicate { ! private Type _type; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="type">type to evaluate against</param> public IsTypeOf(Type type) { ! this._type = type; } ! /// <summary> ! /// Evaluates the input value to verify that it is correctly typed. ! /// </summary> ! /// <param name="currentValue">input value</param> ! /// <returns>True if the original type is assignable from the input value, false otherwise.</returns> public bool Eval(object currentValue) { ! return currentValue == null ? false : _type.IsAssignableFrom(currentValue.GetType()); } } Index: IsIn.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsIn.cs,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** IsIn.cs 1 Apr 2003 01:43:57 -0000 1.2 --- IsIn.cs 1 Jan 2005 22:32:09 -0000 1.2.4.1 *************** *** 1,59 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class IsIn : IPredicate { ! private object[] inList; ! public IsIn(params object[] inList) { --- 1,16 ---- using System; namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that looks for an input value in an array of values. + /// </summary> public class IsIn : IPredicate { ! private object[] _inList; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="inList">array of values to use for searching</param> public IsIn(params object[] inList) { *************** *** 61,78 **** { Array arr = (Array)inList[0]; ! this.inList = new object[arr.Length]; ! arr.CopyTo(this.inList, 0); } else { ! this.inList = inList; } } ! ! public bool Eval(object currentValue) { ! foreach (object o in inList) { ! if (o.Equals(currentValue)) { return true; --- 18,39 ---- { Array arr = (Array)inList[0]; ! this._inList = new object[arr.Length]; ! arr.CopyTo(this._inList, 0); } else { ! this._inList = inList; } } ! /// <summary> ! /// Evaluates the input value by looking within the original array list of values for the input value. ! /// </summary> ! /// <param name="inputValue">input value to look for</param> ! /// <returns>True if the input value is found, false otherwise.</returns> ! public bool Eval(object inputValue) { ! foreach (object o in _inList) { ! if (o.Equals(inputValue)) { return true; Index: IsMatch.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsMatch.cs,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** IsMatch.cs 1 Apr 2003 01:43:57 -0000 1.2 --- IsMatch.cs 1 Jan 2005 22:32:09 -0000 1.2.4.1 *************** *** 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.Text.RegularExpressions; --- 1,2 ---- *************** *** 53,77 **** namespace DotNetMock.Dynamic.Predicates { public class IsMatch : IPredicate { ! private Regex regex; ! public IsMatch(Regex regex) { ! this.regex = regex; ! } ! ! public IsMatch(String regex) : this(new Regex(regex)) ! { ! } ! ! public IsMatch(String regex, bool ignoreCase) : ! this(new Regex(regex, ignoreCase ? RegexOptions.IgnoreCase : RegexOptions.None)) ! { } ! ! public bool Eval(object currentValue) { ! return currentValue == null ? false : regex.IsMatch(currentValue.ToString()); } } --- 4,40 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that compares the input value against an regular expression pattern. + /// </summary> public class IsMatch : IPredicate { ! private Regex _regex; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="regex">Regular expression object to use.</param> public IsMatch(Regex regex) { ! this._regex = regex; } ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="regex">Regular expression pattern to use.</param> ! public IsMatch(String regex) : this(new Regex(regex)) {} ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="regex">Regular expression pattern to use.</param> ! /// <param name="ignoreCase">Flag indicating if the regular expression object should ignore case or not.</param> ! public IsMatch(String regex, bool ignoreCase) : this(new Regex(regex, ignoreCase ? RegexOptions.IgnoreCase : RegexOptions.None)) {} ! /// <summary> ! /// Evaluates the input value against the provided regular expression ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if the regular expression matches the input value, flase otherwise.</returns> ! public bool Eval(object inputValue) { ! return inputValue == null ? false : _regex.IsMatch(inputValue.ToString()); } } Index: NotEqual.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/NotEqual.cs,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** NotEqual.cs 1 Apr 2003 01:43:57 -0000 1.2 --- NotEqual.cs 1 Jan 2005 22:32:09 -0000 1.2.4.1 *************** *** 1,67 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class NotEqual : IPredicate { private IPredicate p; ! public NotEqual(object compare) { p = new NotPredicate(new IsEqual(compare)); } ! ! public bool Eval(object currentValue) { ! return p.Eval(currentValue); } } --- 1,26 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that verifies the input value is not equal to the original value. + /// </summary> public class NotEqual : IPredicate { private IPredicate p; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="compare">original value to compare against</param> public NotEqual(object compare) { p = new NotPredicate(new IsEqual(compare)); } ! /// <summary> ! /// Evaluates the input value against the original value. ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if the input value does not equal the original value, false otherwise.</returns> ! public bool Eval(object inputValue) { ! return p.Eval(inputValue); } } Index: IsEqual.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsEqual.cs,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** IsEqual.cs 23 Jul 2004 21:51:05 -0000 1.4 --- IsEqual.cs 1 Jan 2005 22:32:09 -0000 1.4.2.1 *************** *** 3,37 **** namespace DotNetMock.Dynamic.Predicates { public class IsEqual : IPredicate { ! private object compare; ! public IsEqual(object compare) { ! this.compare = compare; } ! ! public bool Eval(object currentValue) { ! if ( ( currentValue == null ) & ( compare != null ) ) { return false; } ! if ( ( currentValue != null ) & ( compare == null ) ) { return false; } ! if ( ( currentValue == null ) & ( compare == null ) ) { return true; } ! if ( compare.GetType().IsArray ) { ! if ( ! currentValue.GetType().IsArray ) { return false; } ! object[] currentArray = (object[]) currentValue; ! object[] compareArray = (object[]) compare; if ( compareArray.Length != currentArray.Length ) { --- 3,47 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> comparing two values + /// </summary> public class IsEqual : IPredicate { ! private object _compare; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="compare">value to compare against</param> public IsEqual(object compare) { ! _compare = compare; } ! /// <summary> ! /// Evaluates input value against original value for equality ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if input value equals original value, false otherwise.</returns> ! public bool Eval(object inputValue) { ! if ( ( inputValue == null ) & ( _compare != null ) ) { return false; } ! if ( ( inputValue != null ) & ( _compare == null ) ) { return false; } ! if ( ( inputValue == null ) & ( _compare == null ) ) { return true; } ! if ( _compare.GetType().IsArray ) { ! if ( ! inputValue.GetType().IsArray ) { return false; } ! object[] currentArray = (object[]) inputValue; ! object[] compareArray = (object[]) _compare; if ( compareArray.Length != currentArray.Length ) { *************** *** 49,53 **** else { ! return compare.Equals(currentValue); } } --- 59,63 ---- else { ! return _compare.Equals(inputValue); } } Index: IsEqualIgnoreCase.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsEqualIgnoreCase.cs,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** IsEqualIgnoreCase.cs 1 Apr 2003 01:43:57 -0000 1.2 --- IsEqualIgnoreCase.cs 1 Jan 2005 22:32:09 -0000 1.2.4.1 *************** *** 1,68 **** - /* - * ============================================================================ - * 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.Globalization; namespace DotNetMock.Dynamic.Predicates { public class IsEqualIgnoreCase : IPredicate { ! private IPredicate p; ! public IsEqualIgnoreCase(object compare) { ! p = new IsEqual(compare.ToString().ToLower(CultureInfo.CurrentCulture)); } ! ! public bool Eval(object currentValue) { ! return p.Eval(currentValue.ToString().ToLower(CultureInfo.CurrentCulture)); } } --- 1,28 ---- using System.Globalization; namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> comparing strings while ignoring case + /// </summary> public class IsEqualIgnoreCase : IPredicate { ! private IPredicate _originalPredicate; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="compare">Value to compare against</param> public IsEqualIgnoreCase(object compare) { ! _originalPredicate = new IsEqual(compare.ToString().ToLower(CultureInfo.CurrentCulture)); } ! /// <summary> ! /// Evaluates input value against original value, ignoring case. ! /// </summary> ! /// <param name="inputValue">Input value</param> ! /// <returns>True if input value equals original value</returns> ! public bool Eval(object inputValue) { ! return _originalPredicate.Eval(inputValue.ToString().ToLower(CultureInfo.CurrentCulture)); } } Index: NotNull.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/NotNull.cs,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** NotNull.cs 1 Apr 2003 01:43:57 -0000 1.2 --- NotNull.cs 1 Jan 2005 22:32:09 -0000 1.2.4.1 *************** *** 1,60 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class NotNull : IPredicate { ! public bool Eval(object currentValue) { ! return currentValue != null; } } --- 1,17 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that verifies that the input value is null. Opposite of <see cref="IsNull"/>. + /// </summary> public class NotNull : IPredicate { ! /// <summary> ! /// Evaluates the input value against the original value. ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if the input value is not null, false otherwise.</returns> ! public bool Eval(object inputValue) { ! return inputValue != null; } } Index: Predicate.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/Predicate.cs,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** Predicate.cs 1 Apr 2003 01:43:57 -0000 1.2 --- Predicate.cs 1 Jan 2005 22:32:09 -0000 1.2.4.1 *************** *** 1,68 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class Predicate : IPredicate { ! public delegate bool Method(object currentValue); ! private Method m; ! public Predicate(Method m) { ! this.m = m; } ! public bool Eval(object currentValue) { ! return m(currentValue); } } --- 1,31 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that accepts a reference to the a delegate instance that performs the evaluation. + /// </summary> public class Predicate : IPredicate { ! /// <summary> ! /// Delegate that will perform the evaluation of the input value. ! /// </summary> ! public delegate bool EvaluationMethod(object currentValue); ! private EvaluationMethod _evaluationMethod; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="m">Delegate Reference</param> ! public Predicate(EvaluationMethod m) { ! this._evaluationMethod = m; } ! /// <summary> ! /// Evaluates the input value using the delegate method supplied. ! /// </summary> ! /// <param name="currentValue">input value</param> ! /// <returns>The results of the delegation methods evaluation</returns> public bool Eval(object currentValue) { ! return _evaluationMethod(currentValue); } } Index: NotPredicate.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/NotPredicate.cs,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** NotPredicate.cs 1 Apr 2003 01:43:57 -0000 1.2 --- NotPredicate.cs 1 Jan 2005 22:32:09 -0000 1.2.4.1 *************** *** 1,67 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class NotPredicate : IPredicate { ! private IPredicate p; ! ! public NotPredicate(IPredicate p) { ! this.p = p; } ! ! public bool Eval(object currentValue) { ! return !p.Eval(currentValue); } } --- 1,26 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that is used to wrap other <see cref="IPredicate"/> objects, and invert their results. + /// </summary> public class NotPredicate : IPredicate { ! private IPredicate _wrappedPredicate; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="wrappedPredicate">original <see cref="IPredicate"/> to wrap.</param> ! public NotPredicate(IPredicate wrappedPredicate) { ! _wrappedPredicate = wrappedPredicate; } ! /// <summary> ! /// Evaluates the input value against the original value. ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>The opposite ( ! ) of the original <see cref="IPredicate"/>s evaluation.</returns> ! public bool Eval(object inputValue) { ! return !_wrappedPredicate.Eval(inputValue); } } Index: IsCloseTo.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsCloseTo.cs,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** IsCloseTo.cs 24 Jul 2004 13:45:14 -0000 1.3 --- IsCloseTo.cs 1 Jan 2005 22:32:09 -0000 1.3.2.1 *************** *** 4,19 **** namespace DotNetMock.Dynamic.Predicates { public class IsCloseTo : IPredicate { ! ! private double expected; ! private double error; ! public IsCloseTo(double expected, double error) { ! this.expected = expected; ! this.error = error; } ! public bool Eval(object currentValue) { --- 4,29 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> representing a expected value, but also an acceptable delta for the input value + /// </summary> public class IsCloseTo : IPredicate { ! private double _expected; ! private double _error; ! /// <summary> ! /// Default constructor ! /// </summary> ! /// <param name="expected">Expected value</param> ! /// <param name="error">Acceptable delta for input value.</param> public IsCloseTo(double expected, double error) { ! _expected = expected; ! _error = error; } ! /// <summary> ! /// Evalutates input value against any available delta ! /// </summary> ! /// <param name="currentValue">Input value to evaluate</param> ! /// <returns>True if the input value is within acceptable range.</returns> public bool Eval(object currentValue) { *************** *** 21,25 **** { double actual = Convert.ToDouble(currentValue, CultureInfo.CurrentCulture); ! return Math.Abs(actual - expected) <= error; } catch (FormatException) --- 31,35 ---- { double actual = Convert.ToDouble(currentValue, CultureInfo.CurrentCulture); ! return Math.Abs(actual - _expected) <= _error; } catch (FormatException) Index: IsAnything.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsAnything.cs,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** IsAnything.cs 24 Jul 2004 13:45:14 -0000 1.3 --- IsAnything.cs 1 Jan 2005 22:32:09 -0000 1.3.2.1 *************** *** 3,8 **** --- 3,16 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> representing any value + /// </summary> public class IsAnything : IPredicate { + /// <summary> + /// Always evaluates to tue + /// </summary> + /// <param name="currentValue">INput value to evaluate</param> + /// <returns>True</returns> public bool Eval(object currentValue) { Index: IsNull.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsNull.cs,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** IsNull.cs 1 Apr 2003 01:43:57 -0000 1.2 --- IsNull.cs 1 Jan 2005 22:32:09 -0000 1.2.4.1 *************** *** 1,60 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class IsNull : IPredicate { ! public bool Eval(object currentValue) { ! return currentValue == null; } } --- 1,17 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that indicates that the input value should be null. + /// </summary> public class IsNull : IPredicate { ! /// <summary> ! /// Evaluates the input value against null ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if the input value is null, false otherwise.</returns> ! public bool Eval(object inputValue) { ! return inputValue == null; } } Index: IsEqualIgnoreWhiteSpace.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsEqualIgnoreWhiteSpace.cs,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** IsEqualIgnoreWhiteSpace.cs 1 Apr 2003 01:43:57 -0000 1.2 --- IsEqualIgnoreWhiteSpace.cs 1 Jan 2005 22:32:09 -0000 1.2.4.1 *************** *** 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.Text; --- 1,2 ---- *************** *** 53,75 **** namespace DotNetMock.Dynamic.Predicates { public class IsEqualIgnoreWhiteSpace : IPredicate { ! private IPredicate p; ! public IsEqualIgnoreWhiteSpace(object compare) { ! p = new IsEqual(StripSpace(compare.ToString())); } ! ! public bool Eval(object currentValue) { ! return p.Eval(StripSpace(currentValue.ToString())); } ! ! public static string StripSpace(string s) { StringBuilder result = new StringBuilder(); bool lastWasSpace = true; ! foreach(char c in s) { if (Char.IsWhiteSpace(c)) --- 4,40 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> comparing string values that ignore whitespace. + /// </summary> public class IsEqualIgnoreWhiteSpace : IPredicate { ! private IPredicate _originalPredicate; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="compare">original value to compare against</param> public IsEqualIgnoreWhiteSpace(object compare) { ! _originalPredicate = new IsEqual(StripSpace(compare.ToString())); } ! /// <summary> ! /// Evaluates the inputValue against the original, ignoring any white space encountered. ! /// </summary> ! /// <param name="inputValue">input value to compare</param> ! /// <returns>True if the input value equals the original value, false otherwise</returns> ! public bool Eval(object inputValue) { ! return _originalPredicate.Eval(StripSpace(inputValue.ToString())); } ! /// <summary> ! /// Strips any whitespace from the input string ! /// </summary> ! /// <param name="inputString">input string</param> ! /// <returns>input string, with whitespace removed</returns> ! public static string StripSpace(string inputString) { StringBuilder result = new StringBuilder(); bool lastWasSpace = true; ! foreach(char c in inputString) { if (Char.IsWhiteSpace(c)) Index: NotIn.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/NotIn.cs,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** NotIn.cs 1 Apr 2003 01:43:57 -0000 1.2 --- NotIn.cs 1 Jan 2005 22:32:09 -0000 1.2.4.1 *************** *** 1,67 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class NotIn : IPredicate { private IPredicate p; ! public NotIn(params object[] inList) { p = new NotPredicate(new IsIn(inList)); } ! ! public bool Eval(object currentValue) { ! return p.Eval(currentValue); } } --- 1,26 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> to verify that the input value is not in the original list of values. Opposite of <see cref="IsIn"/>. + /// </summary> public class NotIn : IPredicate { private IPredicate p; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="inList">original list of values</param> public NotIn(params object[] inList) { p = new NotPredicate(new IsIn(inList)); } ! /// <summary> ! /// Evaluates the input value against the original value. ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if the input value is not in the original array of values, false otherwise.</returns> ! public bool Eval(object inputValue) { ! return p.Eval(inputValue); } } Index: OrPredicate.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/OrPredicate.cs,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** OrPredicate.cs 1 Apr 2003 01:43:57 -0000 1.2 --- OrPredicate.cs 1 Jan 2005 22:32:09 -0000 1.2.4.1 *************** *** 1,68 **** - /* - * ============================================================================ - * 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 info... [truncated message content] |
From: Griffin C. <gc...@us...> - 2005-01-01 22:32:18
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13904/DotNetMock/Dynamic Modified Files: Tag: RFE_1001778 DynamicMock.cs DynamicOrderedMock.cs ExpectationMethod.cs Log Message: - Merged changes from HEAD Index: DynamicOrderedMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicOrderedMock.cs,v retrieving revision 1.3.2.3 retrieving revision 1.3.2.4 diff -C2 -d -r1.3.2.3 -r1.3.2.4 *** DynamicOrderedMock.cs 1 Jan 2005 21:57:15 -0000 1.3.2.3 --- DynamicOrderedMock.cs 1 Jan 2005 22:32:08 -0000 1.3.2.4 *************** *** 11,24 **** namespace DotNetMock.Dynamic { public class DynamicOrderedMock : DynamicMock { private IList expectations = new ArrayList(); ! public DynamicOrderedMock( string name ) : base( name ) ! { ! } public DynamicOrderedMock( Type type, string name ) : base( type, name ){} public DynamicOrderedMock( Type type ) : base( type ) {} ! public override void Verify() { --- 11,40 ---- namespace DotNetMock.Dynamic { + /// <summary> + /// Represents a dynamic mock object that enables expectations to be set to be called in a certain order. + /// </summary> public class DynamicOrderedMock : DynamicMock { private IList expectations = new ArrayList(); ! /// <summary> ! /// Default constructor ! /// </summary> ! /// <param name="name">Name for the mock object</param> ! public DynamicOrderedMock( string name ) : base( name ) {} ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="type">Type to generate the mock for</param> ! /// <param name="name">Name for the mock object</param> public DynamicOrderedMock( Type type, string name ) : base( type, name ){} + /// <summary> + /// Default Constructor + /// </summary> + /// <param name="type">Type to generate the mock for</param> public DynamicOrderedMock( Type type ) : base( type ) {} ! /// <summary> ! /// Verifies the mock object. ! /// </summary> public override void Verify() { *************** *** 56,60 **** return String.Empty; } ! protected override void addExpectation(ExpectationMethod e) { --- 72,79 ---- return String.Empty; } ! /// <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) { Index: DynamicMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicMock.cs,v retrieving revision 1.11.2.3 retrieving revision 1.11.2.4 diff -C2 -d -r1.11.2.3 -r1.11.2.4 *** DynamicMock.cs 1 Jan 2005 21:57:15 -0000 1.11.2.3 --- DynamicMock.cs 1 Jan 2005 22:32:08 -0000 1.11.2.4 *************** *** 23,30 **** private bool strict; private IDictionary expectations; - protected IDictionary values; private bool verified; private Type type; ! public DynamicMock() { --- 23,35 ---- private bool strict; private IDictionary expectations; private bool verified; private Type type; ! /// <summary> ! /// Holds the expectation values for an specified methods. ! /// </summary> ! protected IDictionary values; ! /// <summary> ! /// Default Constructor ! /// </summary> public DynamicMock() { *************** *** 33,40 **** --- 38,53 ---- values = new Hashtable(); } + /// <summary> + /// Default Constructor + /// </summary> + /// <param name="name">Name to assign to the generated mock</param> public DynamicMock(string name) : this() { _name = name; } + /// <summary> + /// Default Constructor + /// </summary> + /// <param name="type">Type to generate the mock for.</param> public DynamicMock( Type type ) : this() { *************** *** 48,56 **** this.type = type; } ! public DynamicMock( Type type, string name ) : this( name ) { this.type = type; } public virtual object Object { --- 61,76 ---- this.type = type; } ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="type">Type to generate the mock for.</param> ! /// <param name="name">Name for the generated mock</param> public DynamicMock( Type type, string name ) : this( name ) { this.type = type; } + /// <summary> + /// Returns the generated mock object for the given type. + /// </summary> public virtual object Object { *************** *** 64,73 **** } } ! ! private void generate() ! { ! ClassGenerator cg = new ClassGenerator(); ! obj = cg.Generate(type, this); ! } public virtual bool Strict { --- 84,91 ---- } } ! /// <summary> ! /// Sets / Gets the Strict flag for the mock object. If this flag is set, only specific operations ! /// will be allowed on the generated mock object. ! /// </summary> public virtual bool Strict { *************** *** 75,78 **** --- 93,99 ---- set { strict = value; } } + /// <summary> + /// Gets / Sets the name for the generated mock object + /// </summary> public string MockName { *************** *** 87,91 **** get { return verified; } } - /// <summary> /// Throws NotImplementedException. --- 108,111 ---- *************** *** 96,99 **** --- 116,122 ---- throw new NotImplementedException(methodName + " not currently implemented"); } + /// <summary> + /// Verifies the this mock object. + /// </summary> public virtual void Verify() { *************** *** 107,131 **** } } ! public virtual void Expect(string methodName, params object[] args) { ExpectAndReturn(methodName, null, args); } ! public virtual void ExpectNoCall(string methodName) { addExpectation(new ExpectationMethod(methodName, null, null, new VerifyException(methodName + "() should never be called."))); } ! public virtual void ExpectAndReturn( string methodName, object result, params object[] args ) { addExpectation( new ExpectationMethod( methodName, result, args ) ); } ! public virtual void ExpectAndThrow( string methodName, Exception e, params object[] args) { addExpectation( new ExpectationMethod( methodName, null, args, e ) ); } ! public virtual void SetValue(string methodName, object returnVal) { --- 130,175 ---- } } ! /// <summary> ! /// Adds expected call to the method with the supplied arguments. ! /// </summary> ! /// <param name="methodName">Name of expected method to be called</param> ! /// <param name="args">Expected arguments</param> public virtual void Expect(string methodName, params object[] args) { ExpectAndReturn(methodName, null, args); } ! /// <summary> ! /// Adds the expectation that the supplied method should not be called. ! /// </summary> ! /// <param name="methodName">Name of the method</param> public virtual void ExpectNoCall(string methodName) { addExpectation(new ExpectationMethod(methodName, null, null, new VerifyException(methodName + "() should never be called."))); } ! /// <summary> ! /// Addes a expected call with the supplied parameters, that returns an expected result. ! /// </summary> ! /// <param name="methodName">Name of expected method to be called</param> ! /// <param name="result">Results to return</param> ! /// <param name="args">Expected arguments</param> public virtual void ExpectAndReturn( string methodName, object result, params object[] args ) { addExpectation( new ExpectationMethod( methodName, result, args ) ); } ! /// <summary> ! /// Addes an expected call that results in the given exception being thrown. ! /// </summary> ! /// <param name="methodName">Method to call</param> ! /// <param name="e">Exception to throw</param> ! /// <param name="args">Expected arguments</param> public virtual void ExpectAndThrow( string methodName, Exception e, params object[] args) { addExpectation( new ExpectationMethod( methodName, null, args, e ) ); } ! /// <summary> ! /// Sets the return value for the supplied method ! /// </summary> ! /// <param name="methodName">Method to call</param> ! /// <param name="returnVal">Value to return</param> public virtual void SetValue(string methodName, object returnVal) { *************** *** 159,165 **** return e.ReturnValue; } ! ! ! protected virtual void addExpectation(ExpectationMethod e) { --- 203,210 ---- return e.ReturnValue; } ! /// <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) { *************** *** 182,185 **** --- 227,236 ---- return methodName; } + + private void generate() + { + ClassGenerator cg = new ClassGenerator(); + obj = cg.Generate(type, this); + } } } Index: ExpectationMethod.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/ExpectationMethod.cs,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.2 diff -C2 -d -r1.7.2.1 -r1.7.2.2 *** ExpectationMethod.cs 30 Dec 2004 00:04:36 -0000 1.7.2.1 --- ExpectationMethod.cs 1 Jan 2005 22:32:08 -0000 1.7.2.2 *************** *** 36,42 **** --- 36,61 ---- /// Default Constructor /// </summary> + /// <param name="methodName">Method name to expect</param> public ExpectationMethod( string methodName ) : this( methodName, null ) {} + /// <summary> + /// Default Constructor + /// </summary> + /// <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 + /// </summary> + /// <param name="methodName">Method name to expect</param> + /// <param name="returnValue">return value when expectation is called</param> + /// <param name="expectedArguments">Arguments to expect when called.</param> public ExpectationMethod( string methodName, object returnValue, object[] expectedArguments ) : this( methodName, returnValue, expectedArguments, null ){} + /// <summary> + /// Default Constructor + /// </summary> + /// <param name="methodName">Method name to expect</param> + /// <param name="returnValue">return value when expectation is called</param> + /// <param name="expectedArguments">Arguments to expect when called.</param> + /// <param name="expectedException">Exception to throw when called.</param> public ExpectationMethod( string methodName, object returnValue, object[] expectedArguments, Exception expectedException) { *************** *** 69,73 **** } /// <summary> ! /// Sets this expectations actual method name & method arguments /// </summary> /// <param name="methodName">Method Name</param> --- 88,92 ---- } /// <summary> ! /// Sets this expectations actual method name and method arguments /// </summary> /// <param name="methodName">Method Name</param> *************** *** 78,81 **** --- 97,104 ---- _methodArguments = methodArguments; } + /// <summary> + /// Calls the input method on this expectation + /// </summary> + /// <param name="methodName">Method name to call</param> public void Call( string methodName ) { |
From: Griffin C. <gc...@us...> - 2005-01-01 22:32:18
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13904/DotNetMock Modified Files: Tag: RFE_1001778 DotNetMock.csproj ExpectationCounter.cs Log Message: - Merged changes from HEAD Index: ExpectationCounter.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ExpectationCounter.cs,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -C2 -d -r1.17 -r1.17.2.1 *** ExpectationCounter.cs 10 Oct 2004 07:53:31 -0000 1.17 --- ExpectationCounter.cs 1 Jan 2005 22:32:07 -0000 1.17.2.1 *************** *** 11,15 **** /// <summary> ! /// Default Constructor. Sets the name of this Expectation & Strict to true /// </summary> /// <param name="name">Name of this Expectation</param> --- 11,15 ---- /// <summary> ! /// Default Constructor. Sets the name of this Expectation and Strict to true /// </summary> /// <param name="name">Name of this Expectation</param> Index: DotNetMock.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/DotNetMock.csproj,v retrieving revision 1.26.2.3 retrieving revision 1.26.2.4 diff -C2 -d -r1.26.2.3 -r1.26.2.4 *** DotNetMock.csproj 30 Dec 2004 00:04:36 -0000 1.26.2.3 --- DotNetMock.csproj 1 Jan 2005 22:32:07 -0000 1.26.2.4 *************** *** 30,34 **** ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" --- 30,34 ---- ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "bin\Debug.xml" DebugSymbols = "true" FileAlignment = "4096" *************** *** 40,44 **** RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" WarningLevel = "4" /> --- 40,44 ---- RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "true" WarningLevel = "4" /> |
From: Griffin C. <gc...@us...> - 2005-01-01 22:32:18
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.csUnitNamespace In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13904/DotNetMock.csUnitNamespace Modified Files: Tag: RFE_1001778 DotNetMock.csUnitNamespace.csproj Log Message: - Merged changes from HEAD Index: DotNetMock.csUnitNamespace.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.csUnitNamespace/DotNetMock.csUnitNamespace.csproj,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** DotNetMock.csUnitNamespace.csproj 22 Mar 2004 03:51:48 -0000 1.1 --- DotNetMock.csUnitNamespace.csproj 1 Jan 2005 22:32:07 -0000 1.1.2.1 *************** *** 30,34 **** ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" --- 30,34 ---- ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "bin\Debug\.xml" DebugSymbols = "true" FileAlignment = "4096" *************** *** 40,44 **** RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" WarningLevel = "4" /> --- 40,44 ---- RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "true" WarningLevel = "4" /> *************** *** 77,81 **** <Reference Name = "System.XML" ! AssemblyName = "System.XML" HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> --- 77,81 ---- <Reference Name = "System.XML" ! AssemblyName = "System.Xml" HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> |
From: Griffin C. <gc...@us...> - 2005-01-01 22:32:18
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Generate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13904/DotNetMock/Dynamic/Generate Modified Files: Tag: RFE_1001778 ClassGenerator.cs Log Message: - Merged changes from HEAD Index: ClassGenerator.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Generate/ClassGenerator.cs,v retrieving revision 1.6.2.9 retrieving revision 1.6.2.10 diff -C2 -d -r1.6.2.9 -r1.6.2.10 *** ClassGenerator.cs 1 Jan 2005 21:57:16 -0000 1.6.2.9 --- ClassGenerator.cs 1 Jan 2005 22:32:08 -0000 1.6.2.10 *************** *** 7,11 **** using System.Reflection; using System.Reflection.Emit; - using DotNetMock.Dynamic; #endregion --- 7,10 ---- *************** *** 13,16 **** --- 12,18 ---- namespace DotNetMock.Dynamic.Generate { + /// <summary> + /// Dynamic Mock object generation engine. Generates the dynamic proxies for dynamic mock objects. + /// </summary> public class ClassGenerator { |
From: Griffin C. <gc...@us...> - 2005-01-01 21:57:29
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7319/DotNetMock.Tests/Dynamic Modified Files: Tag: RFE_1001778 AssignTests.cs DynamicMockTests.cs Log Message: - Changed new Test classes to correct namespace - Added non-ambiguous GetMethod() call for "Call" method in ClassGenerator. - Minor coding std refactorings. Index: DynamicMockTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/DynamicMockTests.cs,v retrieving revision 1.16.2.3 retrieving revision 1.16.2.4 diff -C2 -d -r1.16.2.3 -r1.16.2.4 *** DynamicMockTests.cs 30 Dec 2004 00:04:35 -0000 1.16.2.3 --- DynamicMockTests.cs 1 Jan 2005 21:57:14 -0000 1.16.2.4 *************** *** 5,9 **** using System; using System.Reflection; ! using NUnit.Framework; --- 5,9 ---- using System; using System.Reflection; ! using DotNetMock.Dynamic; using NUnit.Framework; *************** *** 11,15 **** #endregion ! namespace DotNetMock.Dynamic { [TestFixture] --- 11,15 ---- #endregion ! namespace DotNetMock.Tests.Dynamic { [TestFixture] *************** *** 182,186 **** mock.Verify(); } - [Test] [ExpectedException(typeof(AssertionException))] --- 182,185 ---- *************** *** 226,230 **** mock.Verify(); } - [Test] [ExpectedException(typeof(DotNetMock.AssertionException))] --- 225,228 ---- Index: AssignTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/Attic/AssignTests.cs,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** AssignTests.cs 30 Dec 2004 00:04:36 -0000 1.1.2.1 --- AssignTests.cs 1 Jan 2005 21:57:04 -0000 1.1.2.2 *************** *** 3,8 **** #endregion #region Imports ! using System; ! using NUnit.Framework; --- 3,7 ---- #endregion #region Imports ! using DotNetMock.Dynamic; using NUnit.Framework; *************** *** 10,14 **** #endregion ! namespace DotNetMock.Dynamic { [TestFixture] --- 9,13 ---- #endregion ! namespace DotNetMock.Tests.Dynamic { [TestFixture] |
From: Griffin C. <gc...@us...> - 2005-01-01 21:57:27
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Generate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7319/DotNetMock/Dynamic/Generate Modified Files: Tag: RFE_1001778 ClassGenerator.cs Log Message: - Changed new Test classes to correct namespace - Added non-ambiguous GetMethod() call for "Call" method in ClassGenerator. - Minor coding std refactorings. Index: ClassGenerator.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Generate/ClassGenerator.cs,v retrieving revision 1.6.2.8 retrieving revision 1.6.2.9 diff -C2 -d -r1.6.2.8 -r1.6.2.9 *** ClassGenerator.cs 1 Jan 2005 01:38:33 -0000 1.6.2.8 --- ClassGenerator.cs 1 Jan 2005 21:57:16 -0000 1.6.2.9 *************** *** 159,163 **** } ! MethodInfo call = typeof(IMockedCallHandler).GetMethod("Call"); il.EmitCall(OpCodes.Callvirt, call, null); --- 159,163 ---- } ! MethodInfo call = typeof(IMockedCallHandler).GetMethod("Call", new Type[] {typeof(MethodInfo), typeof(object[]) } ); il.EmitCall(OpCodes.Callvirt, call, null); |
From: Griffin C. <gc...@us...> - 2005-01-01 21:57:25
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/Generate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7319/DotNetMock.Tests/Dynamic/Generate Modified Files: Tag: RFE_1001778 ClassGeneratorTests.cs ILUtilsTests.cs Log Message: - Changed new Test classes to correct namespace - Added non-ambiguous GetMethod() call for "Call" method in ClassGenerator. - Minor coding std refactorings. Index: ClassGeneratorTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/Generate/ClassGeneratorTests.cs,v retrieving revision 1.12.2.4 retrieving revision 1.12.2.5 diff -C2 -d -r1.12.2.4 -r1.12.2.5 *** ClassGeneratorTests.cs 27 Dec 2004 00:45:28 -0000 1.12.2.4 --- ClassGeneratorTests.cs 1 Jan 2005 21:57:15 -0000 1.12.2.5 *************** *** 100,103 **** --- 100,109 ---- return null; } + + public object Call( string methodName, params object[] args ) + { + return null; + } + public object[] IncomingArgs = null; public object[] OutgoingArgs = null; Index: ILUtilsTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/Generate/Attic/ILUtilsTests.cs,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** ILUtilsTests.cs 26 Dec 2004 23:58:53 -0000 1.1.2.1 --- ILUtilsTests.cs 1 Jan 2005 21:57:15 -0000 1.1.2.2 *************** *** 7,15 **** using System.Collections; using System.Reflection.Emit; ! using NUnit.Framework; #endregion ! namespace DotNetMock.Dynamic.Generate { [TestFixture] --- 7,15 ---- using System.Collections; using System.Reflection.Emit; ! using DotNetMock.Dynamic.Generate; using NUnit.Framework; #endregion ! namespace DotNetMock.Tests.Dynamic.Generate { [TestFixture] |
From: Griffin C. <gc...@us...> - 2005-01-01 21:57:25
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7319/DotNetMock/Dynamic Modified Files: Tag: RFE_1001778 DynamicMock.cs DynamicOrderedMock.cs Log Message: - Changed new Test classes to correct namespace - Added non-ambiguous GetMethod() call for "Call" method in ClassGenerator. - Minor coding std refactorings. Index: DynamicOrderedMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicOrderedMock.cs,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -C2 -d -r1.3.2.2 -r1.3.2.3 *** DynamicOrderedMock.cs 27 Dec 2004 00:45:28 -0000 1.3.2.2 --- DynamicOrderedMock.cs 1 Jan 2005 21:57:15 -0000 1.3.2.3 *************** *** 29,33 **** public override object Call(MethodInfo mi, params object[] args) { ! string methodName = GetMethodName(mi); if (values.Contains(methodName)) { --- 29,33 ---- public override object Call(MethodInfo mi, params object[] args) { ! string methodName = getMethodName(mi); if (values.Contains(methodName)) { Index: DynamicMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicMock.cs,v retrieving revision 1.11.2.2 retrieving revision 1.11.2.3 diff -C2 -d -r1.11.2.2 -r1.11.2.3 *** DynamicMock.cs 27 Dec 2004 00:45:28 -0000 1.11.2.2 --- DynamicMock.cs 1 Jan 2005 21:57:15 -0000 1.11.2.3 *************** *** 132,139 **** values[methodName] = returnVal; } - public virtual object Call(MethodInfo mi, params object[] args) { ! string methodName = GetMethodName(mi); if (values.Contains(methodName)) { --- 132,138 ---- values[methodName] = returnVal; } public virtual object Call(MethodInfo mi, params object[] args) { ! string methodName = getMethodName(mi); if (values.Contains(methodName)) { *************** *** 161,164 **** --- 160,165 ---- } + + protected virtual void addExpectation(ExpectationMethod e) { *************** *** 172,176 **** } ! protected static string GetMethodName(MethodInfo mi) { string methodName = mi.Name; --- 173,177 ---- } ! protected static string getMethodName( MethodInfo mi ) { string methodName = mi.Name; |
From: Griffin C. <gc...@us...> - 2005-01-01 21:14:37
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30794/DotNetMock.Tests/Dynamic Modified Files: PredicateTests.cs Log Message: - Added remaining XML docs to DotNetMock project - Removed 'using' directives - Minor coding stds refactorings - Removed Apache license from Predicate classes. Index: PredicateTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/PredicateTests.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PredicateTests.cs 9 Oct 2004 21:14:12 -0000 1.9 --- PredicateTests.cs 1 Jan 2005 21:13:46 -0000 1.10 *************** *** 230,234 **** public void Delegate() { ! p = new Predicate(new Predicate.Method(myEval)); myFlag = false; Assertion.Assert(p.Eval(null)); --- 230,234 ---- public void Delegate() { ! p = new Predicate(new Predicate.EvaluationMethod(myEval)); myFlag = false; Assertion.Assert(p.Eval(null)); |
From: Griffin C. <gc...@us...> - 2005-01-01 21:14:33
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30794/DotNetMock/Dynamic Modified Files: DynamicMock.cs DynamicOrderedMock.cs ExpectationMethod.cs Log Message: - Added remaining XML docs to DotNetMock project - Removed 'using' directives - Minor coding stds refactorings - Removed Apache license from Predicate classes. Index: DynamicOrderedMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicOrderedMock.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DynamicOrderedMock.cs 9 Oct 2004 21:14:12 -0000 1.3 --- DynamicOrderedMock.cs 1 Jan 2005 21:13:50 -0000 1.4 *************** *** 4,17 **** namespace DotNetMock.Dynamic { public class DynamicOrderedMock : DynamicMock { private IList expectations = new ArrayList(); ! public DynamicOrderedMock( string name ) : base( name ) ! { ! } public DynamicOrderedMock( Type type, string name ) : base( type, name ){} public DynamicOrderedMock( Type type ) : base( type ) {} ! public override void Verify() { --- 4,33 ---- namespace DotNetMock.Dynamic { + /// <summary> + /// Represents a dynamic mock object that enables expectations to be set to be called in a certain order. + /// </summary> public class DynamicOrderedMock : DynamicMock { private IList expectations = new ArrayList(); ! /// <summary> ! /// Default constructor ! /// </summary> ! /// <param name="name">Name for the mock object</param> ! public DynamicOrderedMock( string name ) : base( name ) {} ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="type">Type to generate the mock for</param> ! /// <param name="name">Name for the mock object</param> public DynamicOrderedMock( Type type, string name ) : base( type, name ){} + /// <summary> + /// Default Constructor + /// </summary> + /// <param name="type">Type to generate the mock for</param> public DynamicOrderedMock( Type type ) : base( type ) {} ! /// <summary> ! /// Verifies the mock object. ! /// </summary> public override void Verify() { *************** *** 20,23 **** --- 36,45 ---- } } + /// <summary> + /// Calls the method on the mock object. + /// </summary> + /// <param name="methodName">Method name to call</param> + /// <param name="args">Arguments to pass to the method</param> + /// <returns>Return value, if any.</returns> public override object Call(string methodName, params object[] args) { *************** *** 48,52 **** return String.Empty; } ! protected override void addExpectation(ExpectationMethod e) { --- 70,77 ---- return String.Empty; } ! /// <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) { Index: DynamicMock.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/DynamicMock.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** DynamicMock.cs 12 Nov 2004 16:03:29 -0000 1.11 --- DynamicMock.cs 1 Jan 2005 21:13:47 -0000 1.12 *************** *** 5,8 **** --- 5,11 ---- namespace DotNetMock.Dynamic { + /// <summary> + /// Basic Dynamic Mock object + /// </summary> public class DynamicMock : IDynamicMock { *************** *** 11,18 **** private bool strict; private IDictionary expectations; - protected IDictionary values; private bool verified; private Type type; ! public DynamicMock() { --- 14,26 ---- private bool strict; private IDictionary expectations; private bool verified; private Type type; ! /// <summary> ! /// Holds the expectation values for an specified methods. ! /// </summary> ! protected IDictionary values; ! /// <summary> ! /// Default Constructor ! /// </summary> public DynamicMock() { *************** *** 21,28 **** --- 29,44 ---- values = new Hashtable(); } + /// <summary> + /// Default Constructor + /// </summary> + /// <param name="name">Name to assign to the generated mock</param> public DynamicMock(string name) : this() { _name = name; } + /// <summary> + /// Default Constructor + /// </summary> + /// <param name="type">Type to generate the mock for.</param> public DynamicMock( Type type ) : this() { *************** *** 36,44 **** this.type = type; } ! public DynamicMock( Type type, string name ) : this( name ) { this.type = type; } public virtual object Object { --- 52,67 ---- this.type = type; } ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="type">Type to generate the mock for.</param> ! /// <param name="name">Name for the generated mock</param> public DynamicMock( Type type, string name ) : this( name ) { this.type = type; } + /// <summary> + /// Returns the generated mock object for the given type. + /// </summary> public virtual object Object { *************** *** 52,61 **** } } ! ! private void generate() ! { ! ClassGenerator cg = new ClassGenerator(); ! obj = cg.Generate(type, this); ! } public virtual bool Strict { --- 75,82 ---- } } ! /// <summary> ! /// Sets / Gets the Strict flag for the mock object. If this flag is set, only specific operations ! /// will be allowed on the generated mock object. ! /// </summary> public virtual bool Strict { *************** *** 63,66 **** --- 84,90 ---- set { strict = value; } } + /// <summary> + /// Gets / Sets the name for the generated mock object + /// </summary> public string MockName { *************** *** 75,79 **** get { return verified; } } - /// <summary> /// Throws NotImplementedException. --- 99,102 ---- *************** *** 84,87 **** --- 107,113 ---- throw new NotImplementedException(methodName + " not currently implemented"); } + /// <summary> + /// Verifies the this mock object. + /// </summary> public virtual void Verify() { *************** *** 95,124 **** } } ! public virtual void Expect(string methodName, params object[] args) { ExpectAndReturn(methodName, null, args); } ! public virtual void ExpectNoCall(string methodName) { addExpectation(new ExpectationMethod(methodName, null, null, new VerifyException(methodName + "() should never be called."))); } ! public virtual void ExpectAndReturn( string methodName, object result, params object[] args ) { addExpectation( new ExpectationMethod( methodName, result, args ) ); } ! public virtual void ExpectAndThrow( string methodName, Exception e, params object[] args) { addExpectation( new ExpectationMethod( methodName, null, args, e ) ); } ! public virtual void SetValue(string methodName, object returnVal) { values[methodName] = returnVal; } ! public virtual object Call( string methodName, params object[] args ) { --- 121,177 ---- } } ! /// <summary> ! /// Adds expected call to the method with the supplied arguments. ! /// </summary> ! /// <param name="methodName">Name of expected method to be called</param> ! /// <param name="args">Expected arguments</param> public virtual void Expect(string methodName, params object[] args) { ExpectAndReturn(methodName, null, args); } ! /// <summary> ! /// Adds the expectation that the supplied method should not be called. ! /// </summary> ! /// <param name="methodName">Name of the method</param> public virtual void ExpectNoCall(string methodName) { addExpectation(new ExpectationMethod(methodName, null, null, new VerifyException(methodName + "() should never be called."))); } ! /// <summary> ! /// Addes a expected call with the supplied parameters, that returns an expected result. ! /// </summary> ! /// <param name="methodName">Name of expected method to be called</param> ! /// <param name="result">Results to return</param> ! /// <param name="args">Expected arguments</param> public virtual void ExpectAndReturn( string methodName, object result, params object[] args ) { addExpectation( new ExpectationMethod( methodName, result, args ) ); } ! /// <summary> ! /// Addes an expected call that results in the given exception being thrown. ! /// </summary> ! /// <param name="methodName">Method to call</param> ! /// <param name="e">Exception to throw</param> ! /// <param name="args">Expected arguments</param> public virtual void ExpectAndThrow( string methodName, Exception e, params object[] args) { addExpectation( new ExpectationMethod( methodName, null, args, e ) ); } ! /// <summary> ! /// Sets the return value for the supplied method ! /// </summary> ! /// <param name="methodName">Method to call</param> ! /// <param name="returnVal">Value to return</param> public virtual void SetValue(string methodName, object returnVal) { values[methodName] = returnVal; } ! /// <summary> ! /// Method embedded into the generated mock object. Calls the method with the expected arguments, ! /// and verfies the method call against the set of expected methods. ! /// </summary> ! /// <param name="methodName">Method name to call</param> ! /// <param name="args">input arguments</param> ! /// <returns>Return value from method call, if any.</returns> public virtual object Call( string methodName, params object[] args ) { *************** *** 147,151 **** return e.ReturnValue; } ! protected virtual void addExpectation(ExpectationMethod e) { --- 200,207 ---- return e.ReturnValue; } ! /// <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) { *************** *** 158,161 **** --- 214,222 ---- list.Add(e); } + private void generate() + { + ClassGenerator cg = new ClassGenerator(); + obj = cg.Generate(type, this); + } } } Index: ExpectationMethod.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/ExpectationMethod.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ExpectationMethod.cs 9 Oct 2004 21:14:12 -0000 1.7 --- ExpectationMethod.cs 1 Jan 2005 21:13:50 -0000 1.8 *************** *** 36,42 **** --- 36,61 ---- /// Default Constructor /// </summary> + /// <param name="methodName">Method name to expect</param> public ExpectationMethod( string methodName ) : this( methodName, null ) {} + /// <summary> + /// Default Constructor + /// </summary> + /// <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 + /// </summary> + /// <param name="methodName">Method name to expect</param> + /// <param name="returnValue">return value when expectation is called</param> + /// <param name="expectedArguments">Arguments to expect when called.</param> public ExpectationMethod( string methodName, object returnValue, object[] expectedArguments ) : this( methodName, returnValue, expectedArguments, null ){} + /// <summary> + /// Default Constructor + /// </summary> + /// <param name="methodName">Method name to expect</param> + /// <param name="returnValue">return value when expectation is called</param> + /// <param name="expectedArguments">Arguments to expect when called.</param> + /// <param name="expectedException">Exception to throw when called.</param> public ExpectationMethod( string methodName, object returnValue, object[] expectedArguments, Exception expectedException) { *************** *** 69,73 **** } /// <summary> ! /// Sets this expectations actual method name & method arguments /// </summary> /// <param name="methodName">Method Name</param> --- 88,92 ---- } /// <summary> ! /// Sets this expectations actual method name and method arguments /// </summary> /// <param name="methodName">Method Name</param> *************** *** 78,81 **** --- 97,104 ---- _methodArguments = methodArguments; } + /// <summary> + /// Calls the input method on this expectation + /// </summary> + /// <param name="methodName">Method name to call</param> public void Call( string methodName ) { |
From: Griffin C. <gc...@us...> - 2005-01-01 21:14:10
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30794/DotNetMock/Dynamic/Predicates Modified Files: AndPredicate.cs IsAnything.cs IsCloseTo.cs IsEqual.cs IsEqualIgnoreCase.cs IsEqualIgnoreWhiteSpace.cs IsIn.cs IsMatch.cs IsNull.cs IsTypeOf.cs NotEqual.cs NotIn.cs NotNull.cs NotPredicate.cs OrPredicate.cs Predicate.cs Log Message: - Added remaining XML docs to DotNetMock project - Removed 'using' directives - Minor coding stds refactorings - Removed Apache license from Predicate classes. Index: AndPredicate.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/AndPredicate.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AndPredicate.cs 24 Jul 2004 13:45:14 -0000 1.3 --- AndPredicate.cs 1 Jan 2005 21:13:54 -0000 1.4 *************** *** 1,10 **** - using System; - namespace DotNetMock.Dynamic.Predicates { public class AndPredicate : IPredicate { private IPredicate p1, p2; ! public AndPredicate(IPredicate p1, IPredicate p2) { --- 1,15 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// Represets a <see cref="IPredicate"/> that expects a value to satisfy two predicates. + /// </summary> public class AndPredicate : IPredicate { private IPredicate p1, p2; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="p1">first <see cref="IPredicate"/></param> ! /// <param name="p2">first <see cref="IPredicate"/></param> public AndPredicate(IPredicate p1, IPredicate p2) { *************** *** 12,16 **** this.p2 = p2; } ! public bool Eval(object currentValue) { --- 17,25 ---- this.p2 = p2; } ! /// <summary> ! /// Evaluates the input value against both <see cref="IPredicate"/>s ! /// </summary> ! /// <param name="currentValue">Value to evaluate</param> ! /// <returns>True if the input value satisfies both <see cref="IPredicate"/> instances</returns> public bool Eval(object currentValue) { Index: IsTypeOf.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsTypeOf.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IsTypeOf.cs 1 Apr 2003 01:43:57 -0000 1.2 --- IsTypeOf.cs 1 Jan 2005 21:13:54 -0000 1.3 *************** *** 1,67 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class IsTypeOf : IPredicate { ! private Type type; ! public IsTypeOf(Type type) { ! this.type = type; } ! public bool Eval(object currentValue) { ! return currentValue == null ? false : type.IsAssignableFrom(currentValue.GetType()); } } --- 1,28 ---- using System; namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that evaluates the input value against the expected <see cref="Type"/> + /// </summary> public class IsTypeOf : IPredicate { ! private Type _type; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="type">type to evaluate against</param> public IsTypeOf(Type type) { ! this._type = type; } ! /// <summary> ! /// Evaluates the input value to verify that it is correctly typed. ! /// </summary> ! /// <param name="currentValue">input value</param> ! /// <returns>True if the original type is assignable from the input value, false otherwise.</returns> public bool Eval(object currentValue) { ! return currentValue == null ? false : _type.IsAssignableFrom(currentValue.GetType()); } } Index: IsIn.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsIn.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IsIn.cs 1 Apr 2003 01:43:57 -0000 1.2 --- IsIn.cs 1 Jan 2005 21:13:54 -0000 1.3 *************** *** 1,59 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class IsIn : IPredicate { ! private object[] inList; ! public IsIn(params object[] inList) { --- 1,16 ---- using System; namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that looks for an input value in an array of values. + /// </summary> public class IsIn : IPredicate { ! private object[] _inList; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="inList">array of values to use for searching</param> public IsIn(params object[] inList) { *************** *** 61,78 **** { Array arr = (Array)inList[0]; ! this.inList = new object[arr.Length]; ! arr.CopyTo(this.inList, 0); } else { ! this.inList = inList; } } ! ! public bool Eval(object currentValue) { ! foreach (object o in inList) { ! if (o.Equals(currentValue)) { return true; --- 18,39 ---- { Array arr = (Array)inList[0]; ! this._inList = new object[arr.Length]; ! arr.CopyTo(this._inList, 0); } else { ! this._inList = inList; } } ! /// <summary> ! /// Evaluates the input value by looking within the original array list of values for the input value. ! /// </summary> ! /// <param name="inputValue">input value to look for</param> ! /// <returns>True if the input value is found, false otherwise.</returns> ! public bool Eval(object inputValue) { ! foreach (object o in _inList) { ! if (o.Equals(inputValue)) { return true; Index: IsMatch.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsMatch.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IsMatch.cs 1 Apr 2003 01:43:57 -0000 1.2 --- IsMatch.cs 1 Jan 2005 21:13:54 -0000 1.3 *************** *** 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.Text.RegularExpressions; --- 1,2 ---- *************** *** 53,77 **** namespace DotNetMock.Dynamic.Predicates { public class IsMatch : IPredicate { ! private Regex regex; ! public IsMatch(Regex regex) { ! this.regex = regex; ! } ! ! public IsMatch(String regex) : this(new Regex(regex)) ! { ! } ! ! public IsMatch(String regex, bool ignoreCase) : ! this(new Regex(regex, ignoreCase ? RegexOptions.IgnoreCase : RegexOptions.None)) ! { } ! ! public bool Eval(object currentValue) { ! return currentValue == null ? false : regex.IsMatch(currentValue.ToString()); } } --- 4,40 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that compares the input value against an regular expression pattern. + /// </summary> public class IsMatch : IPredicate { ! private Regex _regex; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="regex">Regular expression object to use.</param> public IsMatch(Regex regex) { ! this._regex = regex; } ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="regex">Regular expression pattern to use.</param> ! public IsMatch(String regex) : this(new Regex(regex)) {} ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="regex">Regular expression pattern to use.</param> ! /// <param name="ignoreCase">Flag indicating if the regular expression object should ignore case or not.</param> ! public IsMatch(String regex, bool ignoreCase) : this(new Regex(regex, ignoreCase ? RegexOptions.IgnoreCase : RegexOptions.None)) {} ! /// <summary> ! /// Evaluates the input value against the provided regular expression ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if the regular expression matches the input value, flase otherwise.</returns> ! public bool Eval(object inputValue) { ! return inputValue == null ? false : _regex.IsMatch(inputValue.ToString()); } } Index: NotEqual.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/NotEqual.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NotEqual.cs 1 Apr 2003 01:43:57 -0000 1.2 --- NotEqual.cs 1 Jan 2005 21:13:54 -0000 1.3 *************** *** 1,67 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class NotEqual : IPredicate { private IPredicate p; ! public NotEqual(object compare) { p = new NotPredicate(new IsEqual(compare)); } ! ! public bool Eval(object currentValue) { ! return p.Eval(currentValue); } } --- 1,26 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that verifies the input value is not equal to the original value. + /// </summary> public class NotEqual : IPredicate { private IPredicate p; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="compare">original value to compare against</param> public NotEqual(object compare) { p = new NotPredicate(new IsEqual(compare)); } ! /// <summary> ! /// Evaluates the input value against the original value. ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if the input value does not equal the original value, false otherwise.</returns> ! public bool Eval(object inputValue) { ! return p.Eval(inputValue); } } Index: IsEqual.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsEqual.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IsEqual.cs 23 Jul 2004 21:51:05 -0000 1.4 --- IsEqual.cs 1 Jan 2005 21:13:54 -0000 1.5 *************** *** 3,37 **** namespace DotNetMock.Dynamic.Predicates { public class IsEqual : IPredicate { ! private object compare; ! public IsEqual(object compare) { ! this.compare = compare; } ! ! public bool Eval(object currentValue) { ! if ( ( currentValue == null ) & ( compare != null ) ) { return false; } ! if ( ( currentValue != null ) & ( compare == null ) ) { return false; } ! if ( ( currentValue == null ) & ( compare == null ) ) { return true; } ! if ( compare.GetType().IsArray ) { ! if ( ! currentValue.GetType().IsArray ) { return false; } ! object[] currentArray = (object[]) currentValue; ! object[] compareArray = (object[]) compare; if ( compareArray.Length != currentArray.Length ) { --- 3,47 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> comparing two values + /// </summary> public class IsEqual : IPredicate { ! private object _compare; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="compare">value to compare against</param> public IsEqual(object compare) { ! _compare = compare; } ! /// <summary> ! /// Evaluates input value against original value for equality ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if input value equals original value, false otherwise.</returns> ! public bool Eval(object inputValue) { ! if ( ( inputValue == null ) & ( _compare != null ) ) { return false; } ! if ( ( inputValue != null ) & ( _compare == null ) ) { return false; } ! if ( ( inputValue == null ) & ( _compare == null ) ) { return true; } ! if ( _compare.GetType().IsArray ) { ! if ( ! inputValue.GetType().IsArray ) { return false; } ! object[] currentArray = (object[]) inputValue; ! object[] compareArray = (object[]) _compare; if ( compareArray.Length != currentArray.Length ) { *************** *** 49,53 **** else { ! return compare.Equals(currentValue); } } --- 59,63 ---- else { ! return _compare.Equals(inputValue); } } Index: IsEqualIgnoreCase.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsEqualIgnoreCase.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IsEqualIgnoreCase.cs 1 Apr 2003 01:43:57 -0000 1.2 --- IsEqualIgnoreCase.cs 1 Jan 2005 21:13:54 -0000 1.3 *************** *** 1,68 **** - /* - * ============================================================================ - * 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.Globalization; namespace DotNetMock.Dynamic.Predicates { public class IsEqualIgnoreCase : IPredicate { ! private IPredicate p; ! public IsEqualIgnoreCase(object compare) { ! p = new IsEqual(compare.ToString().ToLower(CultureInfo.CurrentCulture)); } ! ! public bool Eval(object currentValue) { ! return p.Eval(currentValue.ToString().ToLower(CultureInfo.CurrentCulture)); } } --- 1,28 ---- using System.Globalization; namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> comparing strings while ignoring case + /// </summary> public class IsEqualIgnoreCase : IPredicate { ! private IPredicate _originalPredicate; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="compare">Value to compare against</param> public IsEqualIgnoreCase(object compare) { ! _originalPredicate = new IsEqual(compare.ToString().ToLower(CultureInfo.CurrentCulture)); } ! /// <summary> ! /// Evaluates input value against original value, ignoring case. ! /// </summary> ! /// <param name="inputValue">Input value</param> ! /// <returns>True if input value equals original value</returns> ! public bool Eval(object inputValue) { ! return _originalPredicate.Eval(inputValue.ToString().ToLower(CultureInfo.CurrentCulture)); } } Index: NotNull.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/NotNull.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NotNull.cs 1 Apr 2003 01:43:57 -0000 1.2 --- NotNull.cs 1 Jan 2005 21:13:54 -0000 1.3 *************** *** 1,60 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class NotNull : IPredicate { ! public bool Eval(object currentValue) { ! return currentValue != null; } } --- 1,17 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that verifies that the input value is null. Opposite of <see cref="IsNull"/>. + /// </summary> public class NotNull : IPredicate { ! /// <summary> ! /// Evaluates the input value against the original value. ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if the input value is not null, false otherwise.</returns> ! public bool Eval(object inputValue) { ! return inputValue != null; } } Index: Predicate.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/Predicate.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Predicate.cs 1 Apr 2003 01:43:57 -0000 1.2 --- Predicate.cs 1 Jan 2005 21:13:54 -0000 1.3 *************** *** 1,68 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class Predicate : IPredicate { ! public delegate bool Method(object currentValue); ! private Method m; ! public Predicate(Method m) { ! this.m = m; } ! public bool Eval(object currentValue) { ! return m(currentValue); } } --- 1,31 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that accepts a reference to the a delegate instance that performs the evaluation. + /// </summary> public class Predicate : IPredicate { ! /// <summary> ! /// Delegate that will perform the evaluation of the input value. ! /// </summary> ! public delegate bool EvaluationMethod(object currentValue); ! private EvaluationMethod _evaluationMethod; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="m">Delegate Reference</param> ! public Predicate(EvaluationMethod m) { ! this._evaluationMethod = m; } ! /// <summary> ! /// Evaluates the input value using the delegate method supplied. ! /// </summary> ! /// <param name="currentValue">input value</param> ! /// <returns>The results of the delegation methods evaluation</returns> public bool Eval(object currentValue) { ! return _evaluationMethod(currentValue); } } Index: NotPredicate.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/NotPredicate.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NotPredicate.cs 1 Apr 2003 01:43:57 -0000 1.2 --- NotPredicate.cs 1 Jan 2005 21:13:54 -0000 1.3 *************** *** 1,67 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class NotPredicate : IPredicate { ! private IPredicate p; ! ! public NotPredicate(IPredicate p) { ! this.p = p; } ! ! public bool Eval(object currentValue) { ! return !p.Eval(currentValue); } } --- 1,26 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that is used to wrap other <see cref="IPredicate"/> objects, and invert their results. + /// </summary> public class NotPredicate : IPredicate { ! private IPredicate _wrappedPredicate; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="wrappedPredicate">original <see cref="IPredicate"/> to wrap.</param> ! public NotPredicate(IPredicate wrappedPredicate) { ! _wrappedPredicate = wrappedPredicate; } ! /// <summary> ! /// Evaluates the input value against the original value. ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>The opposite ( ! ) of the original <see cref="IPredicate"/>s evaluation.</returns> ! public bool Eval(object inputValue) { ! return !_wrappedPredicate.Eval(inputValue); } } Index: IsCloseTo.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsCloseTo.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IsCloseTo.cs 24 Jul 2004 13:45:14 -0000 1.3 --- IsCloseTo.cs 1 Jan 2005 21:13:54 -0000 1.4 *************** *** 4,19 **** namespace DotNetMock.Dynamic.Predicates { public class IsCloseTo : IPredicate { ! ! private double expected; ! private double error; ! public IsCloseTo(double expected, double error) { ! this.expected = expected; ! this.error = error; } ! public bool Eval(object currentValue) { --- 4,29 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> representing a expected value, but also an acceptable delta for the input value + /// </summary> public class IsCloseTo : IPredicate { ! private double _expected; ! private double _error; ! /// <summary> ! /// Default constructor ! /// </summary> ! /// <param name="expected">Expected value</param> ! /// <param name="error">Acceptable delta for input value.</param> public IsCloseTo(double expected, double error) { ! _expected = expected; ! _error = error; } ! /// <summary> ! /// Evalutates input value against any available delta ! /// </summary> ! /// <param name="currentValue">Input value to evaluate</param> ! /// <returns>True if the input value is within acceptable range.</returns> public bool Eval(object currentValue) { *************** *** 21,25 **** { double actual = Convert.ToDouble(currentValue, CultureInfo.CurrentCulture); ! return Math.Abs(actual - expected) <= error; } catch (FormatException) --- 31,35 ---- { double actual = Convert.ToDouble(currentValue, CultureInfo.CurrentCulture); ! return Math.Abs(actual - _expected) <= _error; } catch (FormatException) Index: IsAnything.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsAnything.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IsAnything.cs 24 Jul 2004 13:45:14 -0000 1.3 --- IsAnything.cs 1 Jan 2005 21:13:54 -0000 1.4 *************** *** 3,8 **** --- 3,16 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> representing any value + /// </summary> public class IsAnything : IPredicate { + /// <summary> + /// Always evaluates to tue + /// </summary> + /// <param name="currentValue">INput value to evaluate</param> + /// <returns>True</returns> public bool Eval(object currentValue) { Index: IsNull.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsNull.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IsNull.cs 1 Apr 2003 01:43:57 -0000 1.2 --- IsNull.cs 1 Jan 2005 21:13:54 -0000 1.3 *************** *** 1,60 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class IsNull : IPredicate { ! public bool Eval(object currentValue) { ! return currentValue == null; } } --- 1,17 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> that indicates that the input value should be null. + /// </summary> public class IsNull : IPredicate { ! /// <summary> ! /// Evaluates the input value against null ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if the input value is null, false otherwise.</returns> ! public bool Eval(object inputValue) { ! return inputValue == null; } } Index: IsEqualIgnoreWhiteSpace.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/IsEqualIgnoreWhiteSpace.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IsEqualIgnoreWhiteSpace.cs 1 Apr 2003 01:43:57 -0000 1.2 --- IsEqualIgnoreWhiteSpace.cs 1 Jan 2005 21:13:54 -0000 1.3 *************** *** 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.Text; --- 1,2 ---- *************** *** 53,75 **** namespace DotNetMock.Dynamic.Predicates { public class IsEqualIgnoreWhiteSpace : IPredicate { ! private IPredicate p; ! public IsEqualIgnoreWhiteSpace(object compare) { ! p = new IsEqual(StripSpace(compare.ToString())); } ! ! public bool Eval(object currentValue) { ! return p.Eval(StripSpace(currentValue.ToString())); } ! ! public static string StripSpace(string s) { StringBuilder result = new StringBuilder(); bool lastWasSpace = true; ! foreach(char c in s) { if (Char.IsWhiteSpace(c)) --- 4,40 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> comparing string values that ignore whitespace. + /// </summary> public class IsEqualIgnoreWhiteSpace : IPredicate { ! private IPredicate _originalPredicate; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="compare">original value to compare against</param> public IsEqualIgnoreWhiteSpace(object compare) { ! _originalPredicate = new IsEqual(StripSpace(compare.ToString())); } ! /// <summary> ! /// Evaluates the inputValue against the original, ignoring any white space encountered. ! /// </summary> ! /// <param name="inputValue">input value to compare</param> ! /// <returns>True if the input value equals the original value, false otherwise</returns> ! public bool Eval(object inputValue) { ! return _originalPredicate.Eval(StripSpace(inputValue.ToString())); } ! /// <summary> ! /// Strips any whitespace from the input string ! /// </summary> ! /// <param name="inputString">input string</param> ! /// <returns>input string, with whitespace removed</returns> ! public static string StripSpace(string inputString) { StringBuilder result = new StringBuilder(); bool lastWasSpace = true; ! foreach(char c in inputString) { if (Char.IsWhiteSpace(c)) Index: NotIn.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/NotIn.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NotIn.cs 1 Apr 2003 01:43:57 -0000 1.2 --- NotIn.cs 1 Jan 2005 21:13:54 -0000 1.3 *************** *** 1,67 **** - /* - * ============================================================================ - * 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.Dynamic.Predicates { public class NotIn : IPredicate { private IPredicate p; ! public NotIn(params object[] inList) { p = new NotPredicate(new IsIn(inList)); } ! ! public bool Eval(object currentValue) { ! return p.Eval(currentValue); } } --- 1,26 ---- namespace DotNetMock.Dynamic.Predicates { + /// <summary> + /// <see cref="IPredicate"/> to verify that the input value is not in the original list of values. Opposite of <see cref="IsIn"/>. + /// </summary> public class NotIn : IPredicate { private IPredicate p; ! /// <summary> ! /// Default Constructor ! /// </summary> ! /// <param name="inList">original list of values</param> public NotIn(params object[] inList) { p = new NotPredicate(new IsIn(inList)); } ! /// <summary> ! /// Evaluates the input value against the original value. ! /// </summary> ! /// <param name="inputValue">input value</param> ! /// <returns>True if the input value is not in the original array of values, false otherwise.</returns> ! public bool Eval(object inputValue) { ! return p.Eval(inputValue); } } Index: OrPredicate.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Predicates/OrPredicate.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OrPredicate.cs 1 Apr 2003 01:43:57 -0000 1.2 --- OrPredicate.cs 1 Jan 2005 21:13:54 -0000 1.3 *************** *** 1,68 **** - /* - * ============================================================================ - * 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... [truncated message content] |
From: Griffin C. <gc...@us...> - 2005-01-01 21:14:07
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30794/DotNetMock Modified Files: ExpectationCounter.cs Log Message: - Added remaining XML docs to DotNetMock project - Removed 'using' directives - Minor coding stds refactorings - Removed Apache license from Predicate classes. Index: ExpectationCounter.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ExpectationCounter.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ExpectationCounter.cs 10 Oct 2004 07:53:31 -0000 1.17 --- ExpectationCounter.cs 1 Jan 2005 21:13:54 -0000 1.18 *************** *** 11,15 **** /// <summary> ! /// Default Constructor. Sets the name of this Expectation & Strict to true /// </summary> /// <param name="name">Name of this Expectation</param> --- 11,15 ---- /// <summary> ! /// Default Constructor. Sets the name of this Expectation and Strict to true /// </summary> /// <param name="name">Name of this Expectation</param> |
From: Griffin C. <gc...@us...> - 2005-01-01 21:14:06
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Generate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30794/DotNetMock/Dynamic/Generate Modified Files: ClassGenerator.cs Log Message: - Added remaining XML docs to DotNetMock project - Removed 'using' directives - Minor coding stds refactorings - Removed Apache license from Predicate classes. Index: ClassGenerator.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Generate/ClassGenerator.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ClassGenerator.cs 29 Jul 2004 16:48:21 -0000 1.6 --- ClassGenerator.cs 1 Jan 2005 21:13:51 -0000 1.7 *************** *** 3,14 **** using System.Reflection; using System.Reflection.Emit; - using System.Security; namespace DotNetMock.Dynamic.Generate { public class ClassGenerator { private static IDictionary boxingOpCodes; ! public object Generate(Type type, IDynamicMock mock) { --- 3,21 ---- using System.Reflection; using System.Reflection.Emit; namespace DotNetMock.Dynamic.Generate { + /// <summary> + /// Dynamic Mock object generation engine. Generates the dynamic proxies for dynamic mock objects. + /// </summary> public class ClassGenerator { private static IDictionary boxingOpCodes; ! /// <summary> ! /// Generates a proxy object for the input type, using the input <see cref="IDynamicMock"/> implementation. ! /// </summary> ! /// <param name="type"><see cref="System.Type"/> to generate proxy object for.</param> ! /// <param name="mock"><see cref="IDynamicMock"/> object containing the parameters for the proxy object</param> ! /// <returns>Generated proxy object</returns> public object Generate(Type type, IDynamicMock mock) { *************** *** 146,150 **** il.Emit(OpCodes.Ret); } ! public OpCode GetBoxingOpCode( Type currentType ) { --- 153,161 ---- il.Emit(OpCodes.Ret); } ! /// <summary> ! /// Returns the IL <see cref="System.Reflection.Emit.OpCode"/> for the input type. ! /// </summary> ! /// <param name="currentType">Type to return op code for.</param> ! /// <returns>Op Code for input type.</returns> public OpCode GetBoxingOpCode( Type currentType ) { *************** *** 166,171 **** } ! OpCode opCode; ! object opCodeObject = boxingOpCodes[currentType]; if (opCodeObject != null) --- 177,182 ---- } ! OpCode opCode; ! object opCodeObject = boxingOpCodes[currentType]; if (opCodeObject != null) *************** *** 182,186 **** } ! return opCode; } --- 193,197 ---- } ! return opCode; } |
From: Griffin C. <gc...@us...> - 2005-01-01 01:49:25
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17196/DotNetMock.Framework/Data Modified Files: MockCommand.cs MockDbDataAdapter.cs Log Message: - Removed "treat warnings as error" setting Index: MockDbDataAdapter.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Data/MockDbDataAdapter.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MockDbDataAdapter.cs 28 Aug 2004 19:08:58 -0000 1.6 --- MockDbDataAdapter.cs 1 Jan 2005 01:49:07 -0000 1.7 *************** *** 260,298 **** #region IDataAdapter Members ! ! public ITableMappingCollection TableMappings ! { ! get ! { ! // TODO: Add MockDbDataAdapter.TableMappings getter implementation ! return null; ! } ! } ! ! public System.Data.MissingSchemaAction MissingSchemaAction ! { ! get ! { ! // TODO: Add MockDbDataAdapter.MissingSchemaAction getter implementation ! return new System.Data.MissingSchemaAction (); ! } ! set ! { ! // TODO: Add MockDbDataAdapter.MissingSchemaAction setter implementation ! } ! } ! ! public System.Data.MissingMappingAction MissingMappingAction ! { ! get ! { ! // TODO: Add MockDbDataAdapter.MissingMappingAction getter implementation ! return new System.Data.MissingMappingAction (); ! } ! set ! { ! // TODO: Add MockDbDataAdapter.MissingMappingAction setter implementation ! } ! } #endregion --- 260,264 ---- #region IDataAdapter Members ! #endregion Index: MockCommand.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/Data/MockCommand.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** MockCommand.cs 26 Jun 2004 20:23:13 -0000 1.17 --- MockCommand.cs 1 Jan 2005 01:49:06 -0000 1.18 *************** *** 337,340 **** --- 337,344 ---- GC.SuppressFinalize(this); } + /// <summary> + /// Releases the unmanaged resources used by the MockCommand and optionally releases the managed resources. + /// </summary> + /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> protected virtual void Dispose(bool disposing) { *************** *** 346,352 **** } /// <summary> ! /// Releases the unmanaged resources used by the MockCommand and optionally releases the managed resources. /// </summary> - /// <param name="dispose">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> ~MockCommand() { --- 350,355 ---- } /// <summary> ! /// Object Finalizer /// </summary> ~MockCommand() { |
From: Griffin C. <gc...@us...> - 2005-01-01 01:49:21
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17196/DotNetMock.Framework Modified Files: DotNetMock.Framework.csproj Log Message: - Removed "treat warnings as error" setting Index: DotNetMock.Framework.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Framework/DotNetMock.Framework.csproj,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** DotNetMock.Framework.csproj 1 Jan 2005 01:44:47 -0000 1.15 --- DotNetMock.Framework.csproj 1 Jan 2005 01:49:07 -0000 1.16 *************** *** 30,34 **** ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "bin\Debug\.xml" DebugSymbols = "true" FileAlignment = "4096" --- 30,34 ---- ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" *************** *** 40,44 **** RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "true" WarningLevel = "4" /> --- 40,44 ---- RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" WarningLevel = "4" /> |
From: Griffin C. <gc...@us...> - 2005-01-01 01:49:16
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17196/DotNetMock.Examples Modified Files: DotNetMock.Examples.csproj Log Message: - Removed "treat warnings as error" setting Index: DotNetMock.Examples.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples/DotNetMock.Examples.csproj,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DotNetMock.Examples.csproj 1 Jan 2005 01:44:47 -0000 1.6 --- DotNetMock.Examples.csproj 1 Jan 2005 01:49:06 -0000 1.7 *************** *** 30,34 **** ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "bin\Debug\.xml" DebugSymbols = "true" FileAlignment = "4096" --- 30,34 ---- ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" *************** *** 40,44 **** RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "true" WarningLevel = "4" /> --- 40,44 ---- RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" WarningLevel = "4" /> |
From: Griffin C. <gc...@us...> - 2005-01-01 01:45:32
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16529/DotNetMock.Core Modified Files: DotNetMock.Core.csproj Log Message: - Turned on XML Doc generation - Turned on "Treat warnings as errors option" Index: DotNetMock.Core.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Core/DotNetMock.Core.csproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DotNetMock.Core.csproj 9 Oct 2004 21:14:11 -0000 1.3 --- DotNetMock.Core.csproj 1 Jan 2005 01:44:38 -0000 1.4 *************** *** 30,34 **** ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" --- 30,34 ---- ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "bin\Debug\.xml" DebugSymbols = "true" FileAlignment = "4096" *************** *** 40,44 **** RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" WarningLevel = "4" /> --- 40,44 ---- RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "true" WarningLevel = "4" /> |
From: Griffin C. <gc...@us...> - 2005-01-01 01:45:04
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.MbUnitNamespace In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16529/DotNetMock.MbUnitNamespace Modified Files: DotNetMock.MbUnitNamespace.csproj Log Message: - Turned on XML Doc generation - Turned on "Treat warnings as errors option" Index: DotNetMock.MbUnitNamespace.csproj =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.MbUnitNamespace/DotNetMock.MbUnitNamespace.csproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DotNetMock.MbUnitNamespace.csproj 11 Jul 2004 03:24:36 -0000 1.2 --- DotNetMock.MbUnitNamespace.csproj 1 Jan 2005 01:44:47 -0000 1.3 *************** *** 30,34 **** ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" --- 30,34 ---- ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" ! DocumentationFile = "bin\Debug\.xml" DebugSymbols = "true" FileAlignment = "4096" *************** *** 40,44 **** RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "false" WarningLevel = "4" /> --- 40,44 ---- RegisterForComInterop = "false" RemoveIntegerChecks = "false" ! TreatWarningsAsErrors = "true" WarningLevel = "4" /> |