Upgraded unit tests to NMock 3.0
git-svn-id: file:///srv/devel/repo-conversion/nusu@214 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
da61476a80
commit
aa5e4d12cc
24 changed files with 284 additions and 320 deletions
|
|
@ -25,7 +25,6 @@ using System.Collections.Generic;
|
|||
#if UNITTEST
|
||||
|
||||
using NUnit.Framework;
|
||||
using NMock2;
|
||||
|
||||
namespace Nuclex.Support.Collections {
|
||||
|
||||
|
|
@ -76,6 +75,35 @@ namespace Nuclex.Support.Collections {
|
|||
|
||||
#endregion // class Dummy
|
||||
|
||||
#region class ListWithoutICollection
|
||||
|
||||
private class ListWithoutICollection : IList<WeakReference<Dummy>> {
|
||||
public int IndexOf(WeakReference<Dummy> item) { throw new NotImplementedException(); }
|
||||
public void Insert(int index, WeakReference<Dummy> item) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public void RemoveAt(int index) { throw new NotImplementedException(); }
|
||||
public WeakReference<Dummy> this[int index] {
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
public void Add(WeakReference<Dummy> item) { throw new NotImplementedException(); }
|
||||
public void Clear() { throw new NotImplementedException(); }
|
||||
public bool Contains(WeakReference<Dummy> item) { throw new NotImplementedException(); }
|
||||
public void CopyTo(WeakReference<Dummy>[] array, int arrayIndex) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public int Count { get { return 12345; } }
|
||||
public bool IsReadOnly { get { throw new NotImplementedException(); } }
|
||||
public bool Remove(WeakReference<Dummy> item) { throw new NotImplementedException(); }
|
||||
public IEnumerator<WeakReference<Dummy>> GetEnumerator() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
IEnumerator IEnumerable.GetEnumerator() { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
#endregion // class ListWithoutICollection
|
||||
|
||||
/// <summary>Verifies that the constructor of the weak collection is working</summary>
|
||||
[Test]
|
||||
public void TestConstructor() {
|
||||
|
|
@ -592,31 +620,6 @@ namespace Nuclex.Support.Collections {
|
|||
}
|
||||
}
|
||||
|
||||
private class ListWithoutICollection : IList<WeakReference<Dummy>> {
|
||||
public int IndexOf(WeakReference<Dummy> item) { throw new NotImplementedException(); }
|
||||
public void Insert(int index, WeakReference<Dummy> item) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public void RemoveAt(int index) { throw new NotImplementedException(); }
|
||||
public WeakReference<Dummy> this[int index] {
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
public void Add(WeakReference<Dummy> item) { throw new NotImplementedException(); }
|
||||
public void Clear() { throw new NotImplementedException(); }
|
||||
public bool Contains(WeakReference<Dummy> item) { throw new NotImplementedException(); }
|
||||
public void CopyTo(WeakReference<Dummy>[] array, int arrayIndex) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public int Count { get { return 12345; } }
|
||||
public bool IsReadOnly { get { throw new NotImplementedException(); } }
|
||||
public bool Remove(WeakReference<Dummy> item) { throw new NotImplementedException(); }
|
||||
public IEnumerator<WeakReference<Dummy>> GetEnumerator() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
IEnumerator IEnumerable.GetEnumerator() { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that the IsSynchronized property and the SyncRoot property are working
|
||||
/// on transforming read only collections based on IList<>s that do not
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue