C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
BaseClientTestSuite.cs
Go to the documentation of this file.
1using AnalyzeRe;
3#if MSTEST
4using Microsoft.VisualStudio.TestTools.UnitTesting;
5#elif NUNIT
6using TestClass = NUnit.Framework.TestFixtureAttribute;
7#endif
8
10{
11 [TestClass]
12 public abstract class BaseClientTestSuite : BaseTestSuite
13 {
15 public static Samples Samples;
16
18 public static Reflection Reflection;
19
21 static BaseClientTestSuite()
22 {
23 Samples = new Samples();
25 }
26
28 {
29 //TODO: Now that we aren't resetting this class between tests, we should
30 // ensure no tests are messing with these settings.
31 //AddCommonTestInitializeAction(ResetClientLibrary);
32 //AddCommonTestCleanupAction(ResetClientLibrary);
33 }
34
35 private static void ResetClientLibrary()
36 { // Trick for resetting a static class
37 // Hack: This doesn't work for non-initialized fields and auto-properties
38 typeof(API).TypeInitializer.Invoke(null, new object[0]);
39 // Try to reset non-initialized fields
40 //TODO: Once the client is static, instantiate this as part of the initialize action.
41 }
42 }
43}
static Samples Samples
Shared instance of a class for generating reusable sample resources.
static Reflection Reflection
Shared instance of a class for generating random resources.
Exposes sample resource objects, with built-in methods for injecting dependencies.
Definition Samples.cs:14
A collection of filthy hacks to populate some fields of APIResources objects of any type.
Definition Reflection.cs:41
API methods / requests made available to the user.