File tree Expand file tree Collapse file tree 6 files changed +44
-50
lines changed
Expand file tree Collapse file tree 6 files changed +44
-50
lines changed Original file line number Diff line number Diff line change 11using System ;
2+ using MbCache . Configuration ;
23using MbCache . Core ;
34using MbCacheTest . TestData ;
45using NUnit . Framework ;
56using SharpTestsEx ;
67
78namespace MbCacheTest . Logic ;
89
9- public class CachingObjectWithParameterCtorClassTest : TestCase
10+ public class CachingObjectWithParameterCtorClassTest
1011{
1112 private IMbCacheFactory factory ;
1213
13- protected override void TestSetup ( )
14- {
15- CacheBuilder
14+ [ SetUp ]
15+ public void Setup ( ) =>
16+ factory = new CacheBuilder ( )
1617 . For < ObjectWithCtorParametersNoInterface > ( )
1718 . CacheMethod ( c => c . CachedMethod ( ) )
18- . AsImplemented ( ) ;
19-
20- factory = CacheBuilder . BuildFactory ( ) ;
21- }
19+ . AsImplemented ( ) . BuildFactory ( ) ;
2220
2321 [ Test ]
2422 public void CanReadProps ( )
Original file line number Diff line number Diff line change 1- using MbCache . Core ;
1+ using MbCache . Configuration ;
2+ using MbCache . Core ;
23using MbCacheTest . TestData ;
34using NUnit . Framework ;
45using SharpTestsEx ;
56
67namespace MbCacheTest . Logic . ClassProxy ;
78
8- public class SimpleCacheAndInvalidationTest : TestCase
9+ public class SimpleCacheAndInvalidationTest
910{
1011 private IMbCacheFactory factory ;
1112
1213
13- protected override void TestSetup ( )
14- {
15- CacheBuilder . For < ObjectReturningNewGuidsNoInterface > ( )
14+ [ SetUp ]
15+ public void Setup ( ) =>
16+ factory = new CacheBuilder ( )
17+ . For < ObjectReturningNewGuidsNoInterface > ( )
1618 . CacheMethod ( c => c . CachedMethod ( ) )
1719 . CacheMethod ( c => c . CachedMethod2 ( ) )
18- . AsImplemented ( ) ;
19-
20- factory = CacheBuilder . BuildFactory ( ) ;
21- }
20+ . AsImplemented ( ) . BuildFactory ( ) ;
2221
2322 [ Test ]
2423 public void ShouldCacheMethod ( )
Original file line number Diff line number Diff line change 1- using MbCache . Core ;
1+ using MbCache . Configuration ;
2+ using MbCache . Core ;
23using MbCacheTest . TestData ;
34using NUnit . Framework ;
45using SharpTestsEx ;
56
67namespace MbCacheTest . Logic . Generics ;
78
8- public class GenericTypeTest : TestCase
9+ public class GenericTypeTest
910{
1011 private IMbCacheFactory factory ;
1112
12- protected override void TestSetup ( )
13- {
14- factory = CacheBuilder . For < ObjectOfGenericType < string > > ( )
13+ [ SetUp ]
14+ public void Setup ( ) =>
15+ factory = new CacheBuilder ( )
16+ . For < ObjectOfGenericType < string > > ( )
1517 . CacheMethod ( m => m . CachedMethod ( 1 , "1" ) )
1618 . As < IObjectOfGenericType < string > > ( )
1719 . BuildFactory ( ) ;
18- }
1920
2021 [ Test ]
2122 public void ShouldCache ( )
Original file line number Diff line number Diff line change 1+ using MbCache . Configuration ;
12using MbCache . Core ;
23using MbCacheTest . TestData ;
34using NUnit . Framework ;
45using SharpTestsEx ;
56
67namespace MbCacheTest . Logic ;
78
8- public class KnownInstanceTest : TestCase
9+ public class KnownInstanceTest
910{
1011 private IMbCacheFactory factory ;
1112
12- protected override void TestSetup ( )
13- {
14- CacheBuilder
13+ [ SetUp ]
14+ public void Setup ( ) =>
15+ factory = new CacheBuilder ( )
1516 . For < ObjectReturningNewGuids > ( )
1617 . CacheMethod ( c => c . CachedMethod ( ) )
1718 . CacheMethod ( c => c . CachedMethod2 ( ) )
18- . As < IObjectReturningNewGuids > ( ) ;
19-
20- factory = CacheBuilder . BuildFactory ( ) ;
21- }
19+ . As < IObjectReturningNewGuids > ( )
20+ . BuildFactory ( ) ;
2221
2322 [ Test ]
2423 public void CanAskFactoryIfComponentIsKnownType ( )
Original file line number Diff line number Diff line change 11using System ;
2+ using MbCache . Configuration ;
23using MbCache . Core ;
34using MbCacheTest . TestData ;
45using NUnit . Framework ;
56using SharpTestsEx ;
67
78namespace MbCacheTest . Logic ;
89
9- public class ProxyExceptionTest : TestCase
10+ public class ProxyExceptionTest
1011{
1112 private IMbCacheFactory factory ;
12-
13-
14- protected override void TestSetup ( )
15- {
16- CacheBuilder
13+
14+ [ SetUp ]
15+ public void Setup ( ) =>
16+ factory = new CacheBuilder ( )
1717 . For < ObjectThrowingError > ( )
1818 . CacheMethod ( c => c . ThrowsArgumentOutOfRangeException ( ) )
19- . AsImplemented ( ) ;
20-
21- factory = CacheBuilder . BuildFactory ( ) ;
22- }
19+ . AsImplemented ( ) . BuildFactory ( ) ;
2320
2421 [ Test ]
2522 public void ShouldThrowOriginalException ( )
Original file line number Diff line number Diff line change 1- using MbCache . Core ;
1+ using MbCache . Configuration ;
2+ using MbCache . Core ;
23using MbCacheTest . TestData ;
34using NUnit . Framework ;
45using SharpTestsEx ;
56
67namespace MbCacheTest . Logic . Wrap ;
78
8- public class InterfaceComponentTest : TestCase
9+ public class InterfaceComponentTest
910{
1011 private IMbCacheFactory factory ;
1112
12- protected override void TestSetup ( )
13- {
14- CacheBuilder . For < ReturningRandomNumbers > ( )
13+ [ SetUp ]
14+ public void Setup ( ) =>
15+ factory = new CacheBuilder ( )
16+ . For < ReturningRandomNumbers > ( )
1517 . CacheMethod ( c => c . CachedNumber ( ) )
1618 . CacheMethod ( c => c . CachedNumber2 ( ) )
17- . As < IReturningRandomNumbers > ( ) ;
18-
19- factory = CacheBuilder . BuildFactory ( ) ;
20- }
19+ . As < IReturningRandomNumbers > ( )
20+ . BuildFactory ( ) ;
2121
2222 [ Test ]
2323 public void ShouldWrapUncachingComponent ( )
You can’t perform that action at this time.
0 commit comments