7using Microsoft.VisualStudio.TestTools.UnitTesting;
10using TestClass = NUnit.Framework.TestFixtureAttribute;
11using TestMethod = NUnit.Framework.TestAttribute;
12using TestCategory = NUnit.Framework.CategoryAttribute;
22 private const string Category =
"Reference";
24 [TestMethod, TestCategory(Category)]
28 Assert.Inconclusive(
"RUN_OFFLINE = true");
38 [TestMethod, TestCategory(Category)]
42 Assert.Inconclusive(
"RUN_OFFLINE = true");
54 [TestMethod, TestCategory(Category)]
58 Assert.Inconclusive(
"RUN_OFFLINE = true");
76 AssertApi.ExceptionThrown<System.Exception>(
78 ex => Assert.IsTrue(ex.Message.Contains(
79 "the collection for resources of type APIResource could not be determined")));
Create a test class that takes care of setting the server URL and cleaning up after each unit test.
Exposes sample resource objects, with built-in methods for injecting dependencies.
IInjectableResource< ILayerView< AggXL > > LayerView_AggXL
IInjectableResource< AggXL > Layer_AggXL
IInjectableResource< EventCatalog > EventCatalog
Test the Reference class to ensure references of different types and instantiated in different ways c...
void Test_Reference_Resolve_SimpleType()
void Test_Reference_Resolve_PolymorphicType()
void Test_Reference_Resolve_GenericType()
Retrieve settings from environment variables if they exist, or the project settings file otherwise.
static bool RUN_OFFLINE
Controls whether tests that normally require a connection to the server should be allowed to try to r...
string id
The resource's unique identifier. It will be used in the request URL when requesting the resource fro...
Representation of an event catalog. The event catalog may cover multiple region/perils,...
Represents the Analysis of a Layer.
Implements the reference entity interface, with support for resolving references using lazy loading.
T GetValue(IEnumerable< Parameter > requestParameters=null, int? timeout=null, bool updateCache=false)
Gets the resource that this reference refers to. If the reference has not previously been resolved,...
T Posted
The posted resource, ready to be referenced.
string id
The resource's unique identifier. It will be used in the request URL when requesting the resource fro...
Represents the Analysis of a Layer.
Abstract representation of a layer.
Base interface for all reference entities.
string ref_id
The id of the object being referred to.
string href
The HREF that can be used to retrieve the object being referred to.
T GetValue(IEnumerable< Parameter > requestParameters=null, int? timeout=null, bool updateCache=false)
Gets the resource that this reference refers to by requesting it from the server.