-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLog4NetAspectTests.cs
More file actions
36 lines (32 loc) · 979 Bytes
/
Log4NetAspectTests.cs
File metadata and controls
36 lines (32 loc) · 979 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
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Shop.Core.Aspects.Postsharp.LogAspects;
using Shop.Core.CrossCuttingConcerns.Logging.Log4Net.Loggers;
namespace Shop.Core.Tests.AspectTests.Postsharp
{
[TestClass]
public class Log4NetAspectTests
{
[TestMethod]
public void TestInstanceMethodWithoutParameter()
{
InstanceMethodWithoutParameter();
// check ShopLogTest database
}
[TestMethod]
public void TestInstanceMethodWithParameter()
{
InstanceMethodWithParameter("Hello World!");
// check ShopLogTest database
}
[Log4NetAspect(typeof(MsSqlLogger))]
private string InstanceMethodWithoutParameter()
{
return "Hello World!";
}
[Log4NetAspect(typeof(MsSqlLogger))]
private string InstanceMethodWithParameter(string message)
{
return message;
}
}
}