This list is closed, nobody may subscribe to it.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(13) |
Oct
(49) |
Nov
(1) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(12) |
Feb
(42) |
Mar
(61) |
Apr
(36) |
May
(20) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(7) |
2004 |
Jan
(29) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
2005 |
Jan
(12) |
Feb
(5) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(15) |
Nov
(89) |
Dec
(85) |
2006 |
Jan
(17) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <gc...@us...> - 2003-02-13 02:56:41
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Security In directory sc8-pr-cvs1:/tmp/cvs-serv4259/DotNetMock/Security Removed Files: MockIPrincipal.cs Log Message: Added System.Security.Principal namespace --- MockIPrincipal.cs DELETED --- |
From: <gc...@us...> - 2003-02-13 02:55:49
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Security/Principal In directory sc8-pr-cvs1:/tmp/cvs-serv4102/Principal Log Message: Directory /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Security/Principal added to the repository |
From: <gc...@us...> - 2003-02-13 02:55:07
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Security/Principal In directory sc8-pr-cvs1:/tmp/cvs-serv3866/Principal Log Message: Directory /cvsroot/dotnetmock/dotnetmock/DotNetMock/Security/Principal added to the repository |
From: <gc...@us...> - 2003-02-13 02:45:16
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Security In directory sc8-pr-cvs1:/tmp/cvs-serv750/DotNetMock.Tests/Security Added Files: MockIPrincipalTests.cs Log Message: Added IPrincipal implementation --- NEW FILE: MockIPrincipalTests.cs --- using System; using System.Security.Principal; using NUnit.Framework; using DotNetMock.Security; namespace DotNetMock.Tests.Security { [TestFixture] public class MockIPrincipalTests { private MockIPrincipal mockPrincipal = null; [SetUp] public void Init() { mockPrincipal = new MockIPrincipal(); } [TearDown] public void Destroy() { mockPrincipal = null; } [Test] public void ExpectedIdentity() { IIdentity expectedIdentity = new System.Security.Principal.GenericIdentity("ExpectedIdentity"); mockPrincipal.SetExpectedIdentity( expectedIdentity ); Assertion.AssertEquals( "Identities don't equal.", expectedIdentity, mockPrincipal.Identity ); } [Test] [ExpectedException(typeof(AssertionException))] public void ExpectedIdentityFails() { IIdentity expectedIdentity = new System.Security.Principal.GenericIdentity("ExpectedIdentity" ); Assertion.AssertEquals( "Identities don't equal", expectedIdentity, mockPrincipal.Identity ); } [Test] public void IsInRole() { String role = "Manager"; mockPrincipal.AddExpectedRole( role ); Assertion.Assert( "Principal is not in role: " + role, mockPrincipal.IsInRole( role ) ); } [Test] public void IsInRoleInValid() { Assertion.Assert( "Principal is in role!", !mockPrincipal.IsInRole( "Employee" ) ); } [Test] public void IsInRoleMultiple() { String[] roles = new String[] { "Manager", "CEO" }; mockPrincipal.AddExpectedRoles( roles ); Assertion.Assert( "Principal is not in role.", mockPrincipal.IsInRole( "CEO" ) ); Assertion.Assert( "Principal is not in role.", mockPrincipal.IsInRole( "Manager" ) ); } [Test] public void IsInRoleCalls() { mockPrincipal.SetExpectedIsInRoleCount( 2 ); mockPrincipal.IsInRole( "" ); mockPrincipal.IsInRole( "" ); mockPrincipal.Verify(); } } } |
From: <gc...@us...> - 2003-02-13 02:45:16
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Security In directory sc8-pr-cvs1:/tmp/cvs-serv750/DotNetMock/Security Added Files: MockIPrincipal.cs Log Message: Added IPrincipal implementation --- NEW FILE: MockIPrincipal.cs --- using System; using System.Collections; using System.Security.Principal; using DotNetMock; namespace DotNetMock.Security { public class MockIPrincipal : MockObject, IPrincipal { private IIdentity _expectedIdentity = null; private ExpectationCounter _isInRoleCalls = new ExpectationCounter("MockIPrincipal.IsIsRoleCalls"); private ArrayList _roles = null; public MockIPrincipal() { this.name = "MockIPrincipal"; _roles = new ArrayList(); } #region MockMethods public void SetExpectedIdentity( IIdentity identity ) { _expectedIdentity = identity; } public void SetExpectedIsInRoleCount( int count ) { _isInRoleCalls.Expected = count; } public void AddExpectedRole( string role ) { _roles.Add( role ); } public void AddExpectedRoles( string[] roles ) { for (int i = 0; i < roles.Length; i++) { AddExpectedRole( roles[i] ); } } #endregion #region Implementation of IPrincipal public bool IsInRole(string roleToSearch) { _isInRoleCalls.Inc(); bool found = false; foreach (string role in _roles) { if (role.Equals(roleToSearch)) { found = true; } } return found; } public System.Security.Principal.IIdentity Identity { get { return _expectedIdentity; } } #endregion } } |
From: <gc...@us...> - 2003-02-13 02:43:28
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Security In directory sc8-pr-cvs1:/tmp/cvs-serv317/Security Log Message: Directory /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Security added to the repository |
From: <gc...@us...> - 2003-02-13 02:42:56
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Security In directory sc8-pr-cvs1:/tmp/cvs-serv32585/Security Log Message: Directory /cvsroot/dotnetmock/dotnetmock/DotNetMock/Security added to the repository |
From: <gc...@us...> - 2003-02-12 04:12:17
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Xml/XPath In directory sc8-pr-cvs1:/tmp/cvs-serv6358/DotNetMock.Tests/Xml/XPath Added Files: MockXPathNavigableTests.cs Log Message: Added MockXPathNavigable --- NEW FILE: MockXPathNavigableTests.cs --- using System; using System.Xml; using System.Xml.XPath; using NUnit.Framework; using DotNetMock.Xml.XPath; namespace DotNetMock.Tests.Xml.XPath { [TestFixture] public class MockXPathNavigableTests { private class TestXPathNavigator : XPathNavigator { public override string BaseURI { get { return null; } } public override System.Xml.XPath.XPathNavigator Clone() { return null; } public override string GetAttribute(string localName, string namespaceURI) { return null; } public override string GetNamespace(string name) { return null; } public override bool HasAttributes { get { return true; } } public override bool HasChildren { get { return true; } } public override bool IsEmptyElement { get { return true; } } public override bool IsSamePosition(System.Xml.XPath.XPathNavigator other) { return true; } public override string LocalName { get { return null; } } public override bool MoveTo(System.Xml.XPath.XPathNavigator other) { return true; } public override bool MoveToAttribute(string localName, string namespaceURI) { return true; } public override bool MoveToFirst() { return true; } public override bool MoveToFirstAttribute() { return true; } public override bool MoveToFirstChild() { return true; } public override bool MoveToFirstNamespace(System.Xml.XPath.XPathNamespaceScope namespaceScope) { return true; } public override bool MoveToId(string id) { return true; } public override bool MoveToNamespace(string name) { return true; } public override bool MoveToNext() { return true; } public override bool MoveToNextAttribute() { return true; } public override bool MoveToNextNamespace(System.Xml.XPath.XPathNamespaceScope namespaceScope) { return true; } public override bool MoveToParent() { return true; } public override void MoveToRoot() { } public override string Name { get { return null; } } public override string NamespaceURI { get { return null; } } public override System.Xml.XmlNameTable NameTable { get { return null; } } public override System.Xml.XPath.XPathNodeType NodeType { get { return new System.Xml.XPath.XPathNodeType(); } } public override string Prefix { get { return null; } } public override string Value { get { return null; } } public override string XmlLang { get { return null; } } public override bool MoveToPrevious() { return true; } } private MockXPathNavigable mockNav = null; [SetUp] public void init() { mockNav = new MockXPathNavigable(); } [TearDown] public void Destroy() { mockNav = null; } [Test] public void CreateNavigatorExpectedCount() { mockNav.SetExpectedCreateCount(2); mockNav.CreateNavigator(); mockNav.CreateNavigator(); mockNav.Verify(); } [Test] [ExpectedException(typeof(AssertionException))] public void CreateNavigatorExpectedCountFails() { mockNav.SetExpectedCreateCount(2); mockNav.CreateNavigator(); mockNav.Verify(); } [Test] [ExpectedException(typeof(XmlException))] public void ExceptionCreateNavigator() { mockNav.SetCreateException(new XmlException("", null)); mockNav.CreateNavigator(); } [Test] public void ExpectedNavigator() { XPathNavigator expectedNav = new TestXPathNavigator(); mockNav.SetExpectedNavigator( expectedNav ); Assertion.AssertEquals("Navigators not equal.", expectedNav, mockNav.CreateNavigator()); } [Test] public void DummyNavigator() { XPathNavigator navigator = null; navigator = mockNav.CreateNavigator(); Assertion.AssertNotNull( "Navigator should never be null.", navigator ); Assertion.AssertEquals( "Navigators should equal.", typeof(XPathNavigator), navigator.GetType().BaseType ); } } } |
From: <gc...@us...> - 2003-02-12 04:12:17
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Xml/XPath In directory sc8-pr-cvs1:/tmp/cvs-serv6358/DotNetMock/Xml/XPath Added Files: MockXPathNavigable.cs Log Message: Added MockXPathNavigable --- NEW FILE: MockXPathNavigable.cs --- using System; using System.Xml; using System.Xml.XPath; using DotNetMock; namespace DotNetMock.Xml.XPath { /// <summary> /// Mock Object implementing IXPathNavigable interface /// </summary> public class MockXPathNavigable : MockObject, IXPathNavigable { /// <summary> /// Number of CreateNavigator() calls to expect /// </summary> private ExpectationCounter _createNavigatorCalls = new ExpectationCounter("MockXPathNavigable.CreateNavigatorCount"); /// <summary> /// Exception to throw on CreateNavigator() call /// </summary> private Exception _expectedException = null; /// <summary> /// XPathNavigator to be returned by a CreateNavigator() call /// </summary> private XPathNavigator _expectedNavigator = null; /// <summary> /// Private, internal class that provides empty implementation of the XPathNavigator abstract /// class. If no XPathNavigator is supplied to be returned, then a empty instance of /// DummyXPathNavigator will be returned /// </summary> private class DummyXPathNavigator : XPathNavigator { public override string BaseURI { get { return null; } } public override System.Xml.XPath.XPathNavigator Clone() { return null; } public override string GetAttribute(string localName, string namespaceURI) { return null; } public override string GetNamespace(string name) { return null; } public override bool HasAttributes { get { return true; } } public override bool HasChildren { get { return true; } } public override bool IsEmptyElement { get { return true; } } public override bool IsSamePosition(System.Xml.XPath.XPathNavigator other) { return true; } public override string LocalName { get { return null; } } public override bool MoveTo(System.Xml.XPath.XPathNavigator other) { return true; } public override bool MoveToAttribute(string localName, string namespaceURI) { return true; } public override bool MoveToFirst() { return true; } public override bool MoveToFirstAttribute() { return true; } public override bool MoveToFirstChild() { return true; } public override bool MoveToFirstNamespace(System.Xml.XPath.XPathNamespaceScope namespaceScope) { return true; } public override bool MoveToId(string id) { return true; } public override bool MoveToNamespace(string name) { return true; } public override bool MoveToNext() { return true; } public override bool MoveToNextAttribute() { return true; } public override bool MoveToNextNamespace(System.Xml.XPath.XPathNamespaceScope namespaceScope) { return true; } public override bool MoveToParent() { return true; } public override void MoveToRoot() { } public override string Name { get { return null; } } public override string NamespaceURI { get { return null; } } public override System.Xml.XmlNameTable NameTable { get { return null; } } public override System.Xml.XPath.XPathNodeType NodeType { get { return new System.Xml.XPath.XPathNodeType(); } } public override string Prefix { get { return null; } } public override string Value { get { return null; } } public override string XmlLang { get { return null; } } public override bool MoveToPrevious() { return true; } } /// <summary> /// Default Constructor. /// </summary> public MockXPathNavigable() { this.name = "MockXPathNavigable"; } #region Mock Methods /// <summary> /// Sets exception to throw on CreateNavigator() calls /// </summary> /// <param name="expected">Excepiton to throw</param> public void SetCreateException( Exception expected ) { _expectedException = expected; } /// <summary> /// Sets number of CreateNavigator() calls to expect /// </summary> /// <param name="count">Calls to expect</param> public void SetExpectedCreateCount( int count ) { _createNavigatorCalls.Expected = count; } /// <summary> /// Sets instance of an XPathNavigator subclass to return on CreateNavigator() calls /// </summary> /// <param name="navigator">XPathNavigator subclass to return</param> public void SetExpectedNavigator( XPathNavigator navigator ) { _expectedNavigator = navigator; } #endregion #region Implementation of IXPathNavigable /// <summary> /// 1) Increments the number of CreateNavigator() calls /// 2) If there is an exception to throw, it is thrown /// 3) If there is an expected XPathNavigator to return, it is returned /// 4) Otherwise, a default empty <seealso cref="DummyXPathNavigator">DummyXPathNavigator</seealso> is returned /// </summary> /// <returns></returns> public System.Xml.XPath.XPathNavigator CreateNavigator() { _createNavigatorCalls.Inc(); if ( _expectedException != null ) { throw _expectedException; } if ( _expectedNavigator != null ) { return _expectedNavigator; } else { return (XPathNavigator) new DummyXPathNavigator(); } } #endregion } } |
From: <gc...@us...> - 2003-02-12 04:11:17
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Xml/XPath In directory sc8-pr-cvs1:/tmp/cvs-serv6148/XPath Log Message: Directory /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Xml/XPath added to the repository |
From: <gc...@us...> - 2003-02-12 04:11:05
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Xml In directory sc8-pr-cvs1:/tmp/cvs-serv6082/Xml Log Message: Directory /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Xml added to the repository |
From: <gc...@us...> - 2003-02-12 04:10:42
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Xml/XPath In directory sc8-pr-cvs1:/tmp/cvs-serv5952/XPath Log Message: Directory /cvsroot/dotnetmock/dotnetmock/DotNetMock/Xml/XPath added to the repository |
From: <gc...@us...> - 2003-02-12 04:10:10
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Xml In directory sc8-pr-cvs1:/tmp/cvs-serv5757/Xml Log Message: Directory /cvsroot/dotnetmock/dotnetmock/DotNetMock/Xml added to the repository |
From: <gc...@us...> - 2003-02-07 03:13:44
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests In directory sc8-pr-cvs1:/tmp/cvs-serv916/DotNetMock.Tests Modified Files: DotNetMock.Tests.build Log Message: Index: DotNetMock.Tests.build =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/DotNetMock.Tests.build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DotNetMock.Tests.build 11 Oct 2002 03:07:59 -0000 1.2 --- DotNetMock.Tests.build 7 Feb 2003 03:13:41 -0000 1.3 *************** *** 2,7 **** <project name=".NET Mock Objects Tests"> <description>Build file for .NET Mock Objects Tests module</description> ! <property name="debug" value="true"/> ! <property name="build.dir" value="../build/"/> <property name="project.name" value="DotNetMock.Tests"/> <tstamp/> --- 2,9 ---- <project name=".NET Mock Objects Tests"> <description>Build file for .NET Mock Objects Tests module</description> ! <property name="debug" value="false"/> ! <property name="bin.dir" value="bin"/> ! <property name="obj.dir" value="obj"/> ! <property name="build.dir" value="../build"/> <property name="project.name" value="DotNetMock.Tests"/> <tstamp/> *************** *** 10,14 **** </target> <target name="clean" description="Cleans environment to pre-build state"> ! <delete dir="${build.dir}" failonerror="false"/> </target> <target name="build" description="Builds .NET Mock Object tests module" depends="init"> --- 12,17 ---- </target> <target name="clean" description="Cleans environment to pre-build state"> ! <delete dir="${bin.dir}" failonerror="false"/> ! <delete dir="${obj.dir}" failonerror="false"/> </target> <target name="build" description="Builds .NET Mock Object tests module" depends="init"> *************** *** 17,23 **** <includes name="**/*.cs"/> </sources> ! <references basedir="../lib"> ! <includes name="nunit.framework.dll"/> ! <includes name="DotNetMock.dll"/> </references> </csc> --- 20,26 ---- <includes name="**/*.cs"/> </sources> ! <references basedir="../"> ! <includes name="lib/nunit.framework.dll"/> ! <includes name="build/DotNetMock.dll"/> </references> </csc> |
From: <gc...@us...> - 2003-02-07 03:13:44
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples In directory sc8-pr-cvs1:/tmp/cvs-serv916/DotNetMock.Examples Modified Files: DotNetMock.Examples.build Log Message: Index: DotNetMock.Examples.build =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples/DotNetMock.Examples.build,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DotNetMock.Examples.build 30 Oct 2002 04:46:51 -0000 1.1 --- DotNetMock.Examples.build 7 Feb 2003 03:13:41 -0000 1.2 *************** *** 2,7 **** <project name=".NET Mock Objects Examples"> <description>Build file for Example .NET Mock Objects module</description> ! <property name="debug" value="true"/> ! <property name="build.dir" value="../build/"/> <property name="project.name" value="DotNetMock.Examples"/> --- 2,9 ---- <project name=".NET Mock Objects Examples"> <description>Build file for Example .NET Mock Objects module</description> ! <property name="debug" value="false"/> ! <property name="bin.dir" value="bin"/> ! <property name="obj.dir" value="obj"/> ! <property name="build.dir" value="../build"/> <property name="project.name" value="DotNetMock.Examples"/> *************** *** 13,31 **** <target name="clean" description="Cleans environment to pre-build state"> ! <delete dir="${build.dir}" failonerror="false"/> ! <delete file="../lib/${project.name}.dll" failonerror="false"/> </target> <target name="build" description="Builds .NET Mock Object Example module" depends="init"> ! <csc target="library" output="${build.dir}/${project.name}.dll" debug="${debug}" doc="${build.dir}\${project.name}.xml"> <sources basedir="."> <includes name="**/*.cs"/> </sources> ! <references basedir="../lib"> ! <includes name="nunit.framework.dll" /> ! <includes name="DotNetMock.dll"/> </references> </csc> - <copy file="${build.dir}/${project.name}.dll" todir="../lib"/> </target> </project> --- 15,32 ---- <target name="clean" description="Cleans environment to pre-build state"> ! <delete dir="${bin.dir}" failonerror="false"/> ! <delete dir="${obj.dir}" failonerror="false"/> </target> <target name="build" description="Builds .NET Mock Object Example module" depends="init"> ! <csc target="library" output="${build.dir}/${project.name}.dll" debug="${debug}"> <sources basedir="."> <includes name="**/*.cs"/> </sources> ! <references basedir="../"> ! <includes name="lib/nunit.framework.dll" /> ! <includes name="build/DotNetMock.dll"/> </references> </csc> </target> </project> |
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock In directory sc8-pr-cvs1:/tmp/cvs-serv916/DotNetMock Modified Files: AbstractExpectationCollection.cs DotNetMock.build ExpectationCounter.cs ExpectationString.cs ExpectationValue.cs Log Message: Index: AbstractExpectationCollection.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/AbstractExpectationCollection.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AbstractExpectationCollection.cs 13 Jan 2003 04:03:57 -0000 1.6 --- AbstractExpectationCollection.cs 7 Feb 2003 03:13:40 -0000 1.7 *************** *** 150,154 **** for (int i = 0; i < this.ActualCollection.Count; i++) { ! NUnit.Framework.Assertion.AssertEquals("Collection items not equal.", this.ExpectedCollection[i].ToString(), this.ActualCollection[i].ToString()); } } --- 150,154 ---- for (int i = 0; i < this.ActualCollection.Count; i++) { ! NUnit.Framework.Assertion.AssertEquals("Collection items not equal at index " + i, this.ExpectedCollection[i].ToString(), this.ActualCollection[i].ToString()); } } Index: DotNetMock.build =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/DotNetMock.build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DotNetMock.build 11 Oct 2002 03:07:59 -0000 1.2 --- DotNetMock.build 7 Feb 2003 03:13:41 -0000 1.3 *************** *** 2,7 **** <project name=".NET Mock Objects"> <description>Build file for main .NET Mock Objects module</description> ! <property name="debug" value="true"/> ! <property name="build.dir" value="../build/"/> <property name="project.name" value="DotNetMock"/> --- 2,9 ---- <project name=".NET Mock Objects"> <description>Build file for main .NET Mock Objects module</description> ! <property name="debug" value="false"/> ! <property name="bin.dir" value="bin"/> ! <property name="obj.dir" value="obj"/> ! <property name="build.dir" value="../build"/> <property name="project.name" value="DotNetMock"/> *************** *** 13,18 **** <target name="clean" description="Cleans environment to pre-build state"> ! <delete dir="${build.dir}" failonerror="false"/> ! <delete file="../lib/${project.name}.dll" failonerror="false"/> </target> --- 15,20 ---- <target name="clean" description="Cleans environment to pre-build state"> ! <delete dir="${bin.dir}" failonerror="false"/> ! <delete dir="${obj.dir}" failonerror="false"/> </target> *************** *** 26,30 **** </references> </csc> - <copy file="${build.dir}/${project.name}.dll" todir="../lib"/> </target> </project> --- 28,31 ---- Index: ExpectationCounter.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ExpectationCounter.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ExpectationCounter.cs 13 Jan 2003 04:03:57 -0000 1.7 --- ExpectationCounter.cs 7 Feb 2003 03:13:41 -0000 1.8 *************** *** 42,46 **** /// </summary> public override void Verify() { ! Assertion.AssertEquals("Did not receive the expected Count.", this._expectedCalls, this._actualCalls); } /// <summary> --- 42,46 ---- /// </summary> public override void Verify() { ! Assertion.AssertEquals("Did not receive the expected Count for object " + this.name, this._expectedCalls, this._actualCalls); } /// <summary> Index: ExpectationString.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ExpectationString.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ExpectationString.cs 13 Jan 2003 04:03:57 -0000 1.5 --- ExpectationString.cs 7 Feb 2003 03:13:41 -0000 1.6 *************** *** 65,69 **** if (this.HasExpectations) { ! NUnit.Framework.Assertion.AssertEquals("String values not equal.", this._expectedString, this._actualString); } } --- 65,69 ---- if (this.HasExpectations) { ! NUnit.Framework.Assertion.AssertEquals("String values not equal for object " + this.name, this._expectedString, this._actualString); } } Index: ExpectationValue.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/ExpectationValue.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ExpectationValue.cs 13 Jan 2003 04:03:57 -0000 1.9 --- ExpectationValue.cs 7 Feb 2003 03:13:41 -0000 1.10 *************** *** 67,71 **** if (this.HasExpectations) { ! NUnit.Framework.Assertion.AssertEquals("Object values do not equal.",this._expectedValue, this._actualValue); } } --- 67,71 ---- if (this.HasExpectations) { ! NUnit.Framework.Assertion.AssertEquals("Object values do not equal for object " + this.name ,this._expectedValue, this._actualValue); } } |
From: <gc...@us...> - 2003-02-07 03:13:43
|
Update of /cvsroot/dotnetmock/dotnetmock In directory sc8-pr-cvs1:/tmp/cvs-serv916 Modified Files: DotNetMock.Master.build Log Message: Index: DotNetMock.Master.build =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Master.build,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DotNetMock.Master.build 6 Jan 2003 03:51:26 -0000 1.5 --- DotNetMock.Master.build 7 Feb 2003 03:13:40 -0000 1.6 *************** *** 2,11 **** <project name=".NET Mock Objects master build file"> <description>Master build file for .NET Mock Objects project</description> ! <property name="debug" value="true"/> <property name="DotNetMock.Core" value="DotNetMock"/> <property name="DotNetMock.Tests" value="DotNetMock.Tests"/> <property name="DotNetMock.Examples" value="DotNetMock.Examples"/> <property name="project.name" value="DotNetMock"/> ! <property name="version" value="0.3"/> <property name="build.dir" value="build/"/> <property name="dist.dir" value="dist"/> --- 2,11 ---- <project name=".NET Mock Objects master build file"> <description>Master build file for .NET Mock Objects project</description> ! <property name="debug" value="false"/> <property name="DotNetMock.Core" value="DotNetMock"/> <property name="DotNetMock.Tests" value="DotNetMock.Tests"/> <property name="DotNetMock.Examples" value="DotNetMock.Examples"/> <property name="project.name" value="DotNetMock"/> ! <property name="version" value="0.4"/> <property name="build.dir" value="build/"/> <property name="dist.dir" value="dist"/> *************** *** 13,31 **** <property name="bin.dir" value="${package.dir}/bin/"/> <property name="src.dir" value="${package.dir}/src"/> <tstamp/> <target name="init" description="Setup environment"> <mkdir dir="${build.dir}" failonerror="false"/> - <mkdir dir="${dist.dir}" failonerror="false"/> - <mkdir dir="${package.dir}" failonerror="false"/> - <mkdir dir="${bin.dir}" failonerror="false"/> - <mkdir dir="${src.dir}" failonerror="false"/> </target> ! <target name="clean" description="Cleans project to pre-build state"> ! <delete dir="${bin.dir}" failonerror="false"/> ! <delete dir="${src.dir}" failonerror="false"/> ! <delete dir="${package.dir}" failonerror="false"/> <delete dir="${dist.dir}" failonerror="false"/> <delete dir="${build.dir}" failonerror="false"/> </target> <target name="clean-all" description="Cleans all sub-projects to pre-build state"> <nant buildfile="${DotNetMock.Core}/${DotNetMock.Core}.build" target="clean"/> --- 13,28 ---- <property name="bin.dir" value="${package.dir}/bin/"/> <property name="src.dir" value="${package.dir}/src"/> + <tstamp/> + <target name="init" description="Setup environment"> <mkdir dir="${build.dir}" failonerror="false"/> </target> ! ! <target name="clean" description="Cleans project to pre-build state"> <delete dir="${dist.dir}" failonerror="false"/> <delete dir="${build.dir}" failonerror="false"/> </target> + <target name="clean-all" description="Cleans all sub-projects to pre-build state"> <nant buildfile="${DotNetMock.Core}/${DotNetMock.Core}.build" target="clean"/> *************** *** 34,43 **** <call target="clean"/> </target> ! <target name="test" depends="build-all"> ! <nunit> ! <formatter type="Xml"/> ! <test class="DotNetMock.Tests" assembly="${build.dir}/DotNetMock.Tests.dll" outfile="${build.dir}/DotNetMock.Tests.Results"/> ! </nunit> ! </target> <target name="build-all" description="Builds .NET Mock Object modules" depends="init"> <nant buildfile="${DotNetMock.Core}/${DotNetMock.Core}.build" target="build"/> --- 31,40 ---- <call target="clean"/> </target> ! ! <target name="test" depends="package"> ! <nunit2> ! <test assemblyname="DotNetMock.Tests.dll"/> ! </nunit2> ! </target> <target name="build-all" description="Builds .NET Mock Object modules" depends="init"> <nant buildfile="${DotNetMock.Core}/${DotNetMock.Core}.build" target="build"/> *************** *** 45,49 **** --- 42,52 ---- <nant buildfile="${DotNetMock.Examples}/${DotNetMock.Examples}.build" target="build"/> </target> + <target name="package" description="Collects and packs up the distribution" depends="build-all doc"> + <mkdir dir="${dist.dir}" failonerror="false"/> + <mkdir dir="${package.dir}" failonerror="false"/> + <mkdir dir="${bin.dir}" failonerror="false"/> + <mkdir dir="${src.dir}" failonerror="false"/> + <copy file="build/${DotNetMock.Core}.dll" tofile="${bin.dir}/${DotNetMock.Core}.dll"/> <copy file="build/${DotNetMock.Tests}.dll" tofile="${bin.dir}/${DotNetMock.Tests}.dll"/> *************** *** 71,74 **** --- 74,78 ---- </zip> </target> + <target name="doc" description="build documentation"> <echo message="Requires HtmlHelp compiler (hhc.exe) to be in the system path"/> *************** *** 104,106 **** --- 108,111 ---- <copy file="${build.dir}/docs/MSDN/DotNetMock.chm" todir="${package.dir}/doc"/> </target> + </project> |
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples/Mainframe In directory sc8-pr-cvs1:/tmp/cvs-serv29018/DotNetMock.Examples/Mainframe Added Files: CustomerNumberCollector.cs CustomerNumberCollectorTests.cs IMainframeConnection.cs MainframeConnection.cs MockMainframeConnection.cs Log Message: --- NEW FILE: CustomerNumberCollector.cs --- using System; namespace DotNetMock.Examples.Mainframe { public class CustomerNumberCollector { private IMainframeConnection _connection = null; private string _name = ""; private string _userName = ""; private string _password = ""; public CustomerNumberCollector(IMainframeConnection connection) { _connection = connection; } public void CollectCustomerInformation(string customerNumber) { _connection.Connect("A"); _connection.SetScreen("MainMenu"); _connection.SetScreen("CustomerInformation"); _connection.PutField(23, 50, customerNumber, customerNumber.Length); _connection.SendKey(MainframeConnection.Keys.Enter); string errorMessage = _connection.GetField(23, 2, 25); if (errorMessage.Equals("CUSTOMER NUMBER NOT FOUND")) { _connection.Disconnect(); throw new ApplicationException("Customer Number could not be found"); } this.Name = _connection.GetField(20, 4, 25); this.UserName = _connection.GetField(21, 4, 8); this.Password = _connection.GetField(22, 4, 8); _connection.Disconnect(); } public void UpdateInformation(string customerNumber, string name, string userName, string password) { _connection.Connect("A"); _connection.SetScreen("MainMenu"); _connection.SetScreen("CustomerInformation"); _connection.PutField(23, 50, customerNumber, customerNumber.Length); _connection.SendKey(MainframeConnection.Keys.Enter); string errorMessage = _connection.GetField(23, 2, 25); if (errorMessage.Equals("CUSTOMER NUMBER NOT FOUND")) { _connection.Disconnect(); throw new ApplicationException("Customer Number could not be found"); } _connection.PutField(20, 4, name, name.Length); _connection.PutField(21, 4, userName, userName.Length); _connection.PutField(22, 4, password, password.Length); _connection.SendKey(MainframeConnection.Keys.Enter); errorMessage = _connection.GetField(23, 2, 25); if (errorMessage.Equals("TRANSACTION FAILED")) { _connection.Disconnect(); throw new ApplicationException("Customer Information update failed."); } this.Name = _connection.GetField(20, 4, 25); this.UserName = _connection.GetField(21, 4, 8); this.Password = _connection.GetField(22, 4, 8); } public string Name { get { return _name.Trim(); } set { _name = value; } } public string UserName { get { return _userName.Trim(); } set { _userName = value; } } public string Password { get { return _password.Trim(); } set { _password = value; } } } } --- NEW FILE: CustomerNumberCollectorTests.cs --- using System; using NUnit.Framework; namespace DotNetMock.Examples.Mainframe { [TestFixture] public class SerialNumberCollectorTests { private MockMainframeConnection mockConnection = null; string[,] customerNumberScreen = null; string[,] mainMenu = null; CustomerNumberCollector customer = null; [SetUp] public void Init() { mockConnection = new MockMainframeConnection(); customerNumberScreen = new string[25,80]; mainMenu = new string[25,80]; customer = new CustomerNumberCollector(mockConnection); mockConnection.CreateScreen("MainMenu", mainMenu); mockConnection.CreateScreen("CustomerInformation", customerNumberScreen); } [TearDown] public void Destroy() { mockConnection = null; customerNumberScreen = null; } [Test] [ExpectedException(typeof(ApplicationException))] public void InValidCustomerNumber() { setGeneralExpectations(); mockConnection.SetExpectedKeyPress(MainframeConnection.Keys.Enter); mockConnection.SetField("CustomerInformation", 23, 2, "CUSTOMER NUMBER NOT FOUND"); customer.CollectCustomerInformation("9999999"); } [Test] public void ValidCustomerNumber() { setGeneralExpectations(); mockConnection.SetField("CustomerInformation", 20, 4, "Pete Rose"); mockConnection.SetField("CustomerInformation", 21, 4, "pete1234"); mockConnection.SetField("CustomerInformation", 22, 4, "password"); mockConnection.SetExpectedKeyPress(MainframeConnection.Keys.Enter); customer.CollectCustomerInformation("1234567"); Assertion.AssertEquals("Pete Rose", customer.Name); Assertion.AssertEquals("pete1234", customer.UserName); Assertion.AssertEquals("password", customer.Password); } [Test] public void ValidCustomerNumberUpdate() { setGeneralExpectations(); mockConnection.SetField("CustomerInformation", 23, 3, "TRANSACTION ACCEPTED"); mockConnection.SetField("CustomerInformation", 20, 4, "Pete Rose"); mockConnection.SetField("CustomerInformation", 21, 4, "pete1234"); mockConnection.SetField("CustomerInformation", 22, 4, "password"); mockConnection.SetExpectedKeyPress(MainframeConnection.Keys.Enter); customer.UpdateInformation("1234567", "Babe Ruth", "baberuth", "babepass"); Assertion.AssertEquals("Babe Ruth", customer.Name); Assertion.AssertEquals("baberuth", customer.UserName); Assertion.AssertEquals("babepass", customer.Password); } [Test] [ExpectedException(typeof(ApplicationException))] public void InvalidCustomerUpdate() { setGeneralExpectations(); mockConnection.SetExpectedKeyPress(MainframeConnection.Keys.Enter); mockConnection.SetField("CustomerInformation", 23, 2, "TRANSACTION FAILED"); customer.UpdateInformation("1234567", "Babe Ruth", "baberuth", "babepass"); } [Test] [ExpectedException(typeof(ApplicationException))] public void InValidCustomerNumberUpdateInformation() { setGeneralExpectations(); mockConnection.SetExpectedKeyPress(MainframeConnection.Keys.Enter); mockConnection.SetField("CustomerInformation", 23, 2, "CUSTOMER NUMBER NOT FOUND"); customer.UpdateInformation("9999999", "", "", ""); } private void setGeneralExpectations() { mockConnection.SetExpectedConnectCalls(1); mockConnection.SetExpectedDisconnectCalls(1); mockConnection.SetExpectedSendKeyCalls(1); } } } --- NEW FILE: IMainframeConnection.cs --- using System; namespace DotNetMock.Examples.Mainframe { /// <summary> /// Interface to connect and utilize a 3rd party mainframe interface. /// This example utilizes NetManage's Rumba api to do screen scraping. /// </summary> public interface IMainframeConnection { /// <summary> /// Connect to a open Rumba Session. /// </summary> /// <param name="sessionID">Session ID to connect to</param> void Connect(string sessionID); /// <summary> /// Sets the screen to a predefined mainframe screen. /// </summary> /// <param name="screenName">Screen to change to</param> void SetScreen(string screenName); /// <summary> /// Puts given text onto the mainframe screen. /// </summary> /// <param name="row">Row #</param> /// <param name="column">Starting Column #</param> /// <param name="message">Message to place</param> /// <param name="length">Length of Message</param> void PutField(int row, int column, string message, int length); /// <summary> /// Gets the text from the screen. /// </summary> /// <param name="row">Row #</param> /// <param name="column">Column #</param> /// <param name="length">Length of the message to get</param> /// <returns>Requested text from the screen</returns> string GetField(int row, int column, int length); /// <summary> /// Sends the key to the screen /// </summary> /// <param name="key">Key to send</param> void SendKey(MainframeConnection.Keys key); /// <summary> /// Waits for control to be returned to the screen /// </summary> void Wait(); /// <summary> /// Disconnects from the current Mainframe session /// </summary> void Disconnect(); } } --- NEW FILE: MainframeConnection.cs --- using System; namespace DotNetMock.Examples.Mainframe { public class MainframeConnection : IMainframeConnection { public MainframeConnection() {} #region IMainframeConnection Implementation public void Connect(string sessionID) { } public void SetScreen(string screenName) { } public void PutField(int row, int column, string message, int length) { } public string GetField(int row, int column, int length) { return ""; } public void SendKey(MainframeConnection.Keys key) { } public void Wait() { } public void Disconnect() { } #endregion public enum Keys { Enter, Clear, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, Shift_F1, Shift_F2, Shift_F3, Shift_F4, Shift_F5, Shift_F6, Shift_F7, Shift_F8, Shift_F9, Shift_F10, Shift_F11, Shift_F12, } } } --- NEW FILE: MockMainframeConnection.cs --- using System; using System.Collections; using DotNetMock; namespace DotNetMock.Examples.Mainframe { public class MockMainframeConnection : IMainframeConnection { private ExpectationCounter _connectCalls = new ExpectationCounter("MockMainframeConnection.ConnectCalls"); private ExpectationCounter _disconnectCalls = new ExpectationCounter("MockMainframeConnection.DisconnectCalls"); private ExpectationCounter _sendKeyCalls = new ExpectationCounter("MockMainframeConnection.SendCalls"); private ExpectationValue _keyPress = new ExpectationValue("MockMainframeConnection.KeyPress"); private Hashtable _screens = null; private string[,] _currentScreen = null; public MockMainframeConnection() { _screens = new Hashtable(); } public void CreateScreen(string screenName, string[,] screen) { foreach (string key in _screens.Keys) { if (key.Equals(screenName)) { throw new ApplicationException("Cannot add duplicate screen: " + screenName); } } _screens.Add(screenName, screen); } public void SetField(string screenName, int row, int column, string message) { string[,] screen = (string[,])_screens[screenName]; if (screen == null) { throw new ApplicationException("No valid screen setup for that screen name: " + screenName); } char[ ]messageArray = message.ToCharArray(); int currentColumn = column - 1; int currentRow = row - 1; for (int i = 0; i < messageArray.Length; i++) { screen[currentRow, currentColumn] = messageArray[i].ToString(); currentColumn++; } } public void SetExpectedConnectCalls(int calls) { _connectCalls.Expected = calls; } public void SetExpectedDisconnectCalls(int calls) { _disconnectCalls.Expected = calls; } public void SetExpectedKeyPress(MainframeConnection.Keys key) { _keyPress.Expected = key; } public void SetExpectedSendKeyCalls(int calls) { _sendKeyCalls.Expected = calls; } #region IMainframeConnection Implementation public void Connect(string sessionID) { _connectCalls.Inc(); } public void SetScreen(string screenName) { bool found = false; foreach (string key in _screens.Keys) { if (key.Equals(screenName)) { found = true; } } if (!found) { throw new ApplicationException("A screen named " + screenName + " has not been setup"); } _currentScreen = (string[,])_screens[screenName]; } public void PutField(int row, int column, string message, int length) { char[ ]messageArray = message.ToCharArray(); int currentColumn = column - 1; int currentRow = row - 1; for (int i = 0; i < messageArray.Length; i++) { _currentScreen[currentRow, currentColumn] = messageArray[i].ToString(); currentColumn++; } } public string GetField(int row, int column, int length) { string output = ""; int currentRow = row - 1; int currentColumn = column - 1; int currentLength = length; int i = 0; try { for (i = 1; i <= currentLength; i++) { output += _currentScreen[currentRow,currentColumn]; currentColumn++; } } catch (System.Exception ex) { throw new System.Exception("currentRow: " + currentRow.ToString() + " Current Column: " + currentColumn.ToString() + " Current Length: " + currentLength.ToString() + " I: " + i.ToString()); } return output; } public void SendKey(MainframeConnection.Keys key) { _sendKeyCalls.Inc(); _keyPress.Actual = key; } public void Wait() { } public void Disconnect() { _disconnectCalls.Inc(); } #endregion } } |
From: <gc...@us...> - 2003-02-03 16:33:08
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples/Mainframe In directory sc8-pr-cvs1:/tmp/cvs-serv28482/Mainframe Log Message: Directory /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples/Mainframe added to the repository |
From: Griffin C. <gri...@ya...> - 2003-01-27 17:48:39
|
Actually, if you could, just post to the DotNetMock-Developers mailing list. Thanks, Griffin --- David Jackman <dja...@us...> wrote: > > Did you receive this message? If so, please reply > to me and I > will use this email to talk with you directly. If > not, I will find > another way. My email is > dav...@ne..., not > what I am seeing on this web form. > > Thanks > ..David.. ===== Griffin Caprio "Your child against mine. The winner will be hailed, the loser will be booed until my throat hurts!" - Homer Simpson to Marge __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Griffin C. <gri...@ya...> - 2003-01-13 14:42:45
|
This is to announce that .NET Mock Objects library, version 0.3, has been release. New in this release: - Fully implemented IDataRead Mock Objects, which completes the implementation of the System.Data core classes. - Added a re-write of the MailingList example that comes with the mockobjects-java package - Cleaned up the XML documentation and API docs - Other, minor refactorings Link to release notes and change log here: https://sourceforge.net/project/shownotes.php?group_id=54948&release_id=133345 ===== Griffin Caprio "Your child against mine. The winner will be hailed, the loser will be booed until my throat hurts!" - Homer Simpson to Marge __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: <gc...@us...> - 2003-01-13 04:13:31
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Data In directory sc8-pr-cvs1:/tmp/cvs-serv9077 Added Files: mockTransaction.cs Log Message: |
From: <gc...@us...> - 2003-01-13 04:11:58
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Data In directory sc8-pr-cvs1:/tmp/cvs-serv8626 Removed Files: mockTransaction.cs Log Message: --- mockTransaction.cs DELETED --- |
From: <gc...@us...> - 2003-01-13 04:11:29
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Data In directory sc8-pr-cvs1:/tmp/cvs-serv8510 Added Files: mockTransaction.cs Log Message: |
From: <gc...@us...> - 2003-01-13 04:07:09
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock In directory sc8-pr-cvs1:/tmp/cvs-serv7506/DotNetMock Removed Files: Null.cs Log Message: --- Null.cs DELETED --- |