2using System.Collections.Generic;
12using Microsoft.VisualStudio.TestTools.UnitTesting;
17using TestCategory =
NUnit.Framework.CategoryAttribute;
31 #region Set Up and Configuration
32 private const string TypeName =
"EventCatalog";
37 #endregion Set Up and Configuration
49 POST_StringAttribute_Empty(
e =>
e.source);
89 PUT_StringAttribute_Empty(
e =>
e.source);
121 GenericTest.POST_InvalidResourceWithData_Fails(TestResource,
133 "The catalog profile had no attributes list.");
135 "The catalog profile's attributes list was empty.");
137 Console.WriteLine(
$"Event Catalog Profile:\n{profile.Serialize()}");
142 Assert.IsNotNull(rate,
"The profile had no \"rate\" attribute.");
144 "Expected the required \"rate\" column to be interpreted as a \"float\" type");
148 Assert.IsNotNull(
eventId,
"The profile had no \"eventid\" attribute.");
150 "Expected the required \"eventid\" column to be interpreted as a \"int\" type");
158 Assert.IsTrue(
attrib.values.SetEquals(
new [] {
"A",
"B" }));
162 Assert.IsTrue(
attrib.values.SetEquals(
new[] {
"X",
"Y" }));
170 #endregion Test Profile
Tests for a stored resource collection which do not require an instance of that resource to be define...
Exposes the various sample CSV files as strings.
static string Event_Catalog_Data
Exposes sample resource objects, with built-in methods for injecting dependencies.
IInjectableResource< EventCatalog > EventCatalog
override IResourceCollection< EventCatalog > collection_source
void Test_EventCatalog_Profile()
void Test_EventCatalog_PUT_Source_Blank()
void Test_EventCatalog_POST_Tags_Empty()
void Test_EventCatalog_POST_Tags_Duplicates()
void Test_EventCatalog_PUT_Tags()
void Test_EventCatalog_PUT_Source()
void Test_EventCatalog_POST_Source_Null()
void Test_EventCatalog_POST_Tags_Null()
void Test_EventCatalog_PUT_Tags_Empty()
void Test_EventCatalog_POST_Source_Blank()
void Test_EventCatalog_PUT_Tags_Duplicates()
void Test_EventCatalog_PUT_Tags_Null()
void Test_EventCatalog_POST_DataEmpty()
override IInjectableResource< EventCatalog > TestInjectableResource
void Test_EventCatalog_PUT_Source_Null()
Generic Unit test implementations that will test REST methods on arbitrary resources.
Describes a collection of resources which can be listed.
API methods / requests made available to the user.
static readonly ResourceCollection< EventCatalog > EventCatalogs
The collection of EventCatalogs on the server.
Represents a column of values parsed out of the catalog.
string type
The type of values that appear in this column, as determined by the server.
An object retrieved from the EventCatalog.profile endpoint of a catalog that describes the columns in...
List< Attribute > attributes
The set of all columns parsed from the catalog.
Representation of an event catalog. The event catalog may cover multiple region/perils,...
Exception raised when the commit process fails.