forked from ServiceStackV3/ServiceStack.Logging
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestBase.cs
More file actions
46 lines (40 loc) · 932 Bytes
/
TestBase.cs
File metadata and controls
46 lines (40 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Diagnostics;
using NUnit.Framework;
using Rhino.Mocks;
namespace ServiceStack.Logging.Tests.Support
{
public class TestBase
{
private MockRepository mocks;
protected virtual MockRepository Mocks
{
get { return mocks; }
}
[SetUp]
protected virtual void SetUp()
{
mocks = new MockRepository();
}
[TearDown]
protected virtual void TearDown()
{
mocks = null;
}
protected virtual void ReplayAll()
{
Mocks.ReplayAll();
}
protected virtual void VerifyAll()
{
try
{
Mocks.VerifyAll();
}
catch (InvalidOperationException ex)
{
Debug.Print("InvalidOperationException thrown: {0}", ex.Message);
}
}
}
}