2using System.Collections.Generic;
17using Microsoft.VisualStudio.TestTools.UnitTesting;
22using TestCategory =
NUnit.Framework.CategoryAttribute;
36 Console.WriteLine(
"Verifying that we can safely POST and simulate a LayerView " +
37 $"containing a reference to this {posted.GetType().NiceTypeName()}");
50 #region ELTLossSet Derived Types Test Classes
54 #region Set Up and Configuration
55 private const string TypeName =
"ELTLossSet";
60 #endregion Set Up and Configuration
64 [
Obsolete(
"This tests a now obsolete class for backwards compatibility purposes.")]
67 #region Set Up and Configuration
68 private const string TypeName =
"PortfolioLossSet";
73 #endregion Set Up and Configuration
95 POST_StringAttribute_Empty(
l =>
l.perspective);
97 #endregion perspective
148 PUT_StringAttribute_Empty(
l =>
l.perspective);
150 #endregion perspective
179 [
Obsolete(
"This tests a now obsolete class for backwards compatibility purposes.")]
182 #region Set Up and Configuration
183 private const string TypeName =
"TreatyLossSet";
188 #endregion Set Up and Configuration
273 #endregion ELTLossSet Derived Types Test Classes
275 #region LossSetWithData Derived Types Test Classes
279 #region Set Up and Configuration
280 private const string TypeName =
"YELTLossSet";
291 #endregion Set Up and Configuration
294 #region event_catalogs
310 #endregion event_catalogs
311 #region yelt_adjustment_attributes
318 #endregion yelt_adjustment_properties
322 [
Obsolete(
"ARE-5226 Remove support for Binary YELT Loss Set format. ")]
329 [
Obsolete(
"ARE-5226 Remove support for Binary YELT Loss Set format. ")]
343 #region event_catalogs
365 #endregion event_catalogs
369 [
Obsolete(
"ARE-5226 Remove support for Binary YELT Loss Set format. ")]
376 [
Obsolete(
"ARE-5226 Remove support for Binary YELT Loss Set format. ")]
381 POST_ForPutTest(TestResource,
posted =>
400 #region Set Up and Configuration
401 private const string TypeName =
"YLTLossSet";
413 #endregion Set Up and Configuration
433 {
"Test1",
"TestValue" },
438 #endregion attributes
452 base.Test_LossSet_PUT_LossType_Null();
467 {
"Test1",
"TestValue" },
472 #endregion attributes
475 #region data / profile tests
481 description =
"Negative Losses",
484 start_date = DateTime.Today
485 },
"trial_id,loss\n1,0\n2,-10");
493 description =
"Simple YLT Profile",
496 start_date = DateTime.Today
497 },
"trial_id,loss\n1,0\n2,10",
ls =>
500 Assert.AreEqual(1.0,
ls.profile.avg_annual_loss);
501 Assert.AreEqual(0
d,
ls.profile.min_loss);
502 Assert.AreEqual(10.0,
ls.profile.max_loss);
503 Assert.AreEqual(
"USD",
ls.profile.currency);
504 Assert.AreEqual(2,
ls.profile.num_losses);
505 Assert.AreEqual(1,
ls.profile.non_zero_losses);
508 #endregion data / profile tests
510 #endregion LossSetWithData Derived Types Test Classes
512 #region Other Loss Set Test Classes
516 #region Set Up and Configuration
517 private const string TypeName =
"ParametricLossSet";
520 #endregion Set Up and Configuration
540 {
"Test1",
"TestValue" },
545 #endregion attributes
578 Samples.Distribution_UniformIntDistribution.AsReference
592 Samples.Distribution_CustomSeverityDistribution.AsReference
630 Samples.Distribution_UniformDistribution.AsReference
644 Samples.Distribution_CustomSeverityDistribution.AsReference
649 #endregion seasonality
682 Samples.Distribution_UniformDistribution.AsReference
696 Samples.Distribution_CustomSeasonalityDistribution.AsReference
717 #endregion start_date
724 Assert.Inconclusive(
"RUN_OFFLINE = true");
727 Assert.IsNotNull(
ls.profile,
"Profile was null");
728 Assert.IsNotNull(
ls.profile.min_loss,
"min_loss was null");
729 Assert.IsNotNull(
ls.profile.max_loss,
"max_loss was null");
730 Assert.IsNotNull(
ls.profile.avg_annual_loss,
"avg_annual_loss was null");
731 Assert.IsNotNull(
ls.profile.num_losses,
"num_losses was null");
734 Assert.IsNull(
ls.profile.non_zero_losses,
"non_zero_losses was null");
735 Assert.IsNotNull(
ls.profile.currency,
"Currency was null");
736 Assert.IsNotNull(
ls.profile.attributes,
"Attributes was null");
737 Assert.AreNotEqual(
ls.profile.attributes.Count, 0,
"Attributes were empty");
771 #region data / profile tests
781 description =
"Retro Coverage Income",
783 seasonality =
oneDist.ToReference(),
785 frequency =
oneDist.ToReference(),
790 Assert.AreEqual(-1
d,
ls.profile.avg_annual_loss);
791 Assert.AreEqual(-1
d,
ls.profile.min_loss);
792 Assert.AreEqual(-1
d,
ls.profile.max_loss);
793 Assert.AreEqual(
"USD",
ls.profile.currency);
794 Assert.AreEqual(1,
ls.profile.num_losses);
795 Assert.IsNull(
ls.profile.non_zero_losses);
799 #endregion data / profile tests
810 testView.layer.loss_sets = Samples.AllLossSetTypesTestList
811 .Select(
ls =>
ls.AsReference).ToList();
822 Samples.LossFilter_RecordTypeAnyOfFilter.AsReference
830 $"The id of the posted layer_view changed on attempt {i} of 10, " +
831 $"despite the request being identical in each case.")));
836 [
Obsolete(
"This tests a now obsolete class for backwards compatibility purposes.")]
839 #region Set Up and Configuration
840 private const string TypeName =
"NestedLayerLossSet";
843 #endregion Set Up and Configuration
849 "should not be LossNetOfAggregateTerms, but API allows it.");
850 base.Test_LossSet_POST_LossType_LossNetOfAggregateTerms();
881 Assert.Inconclusive(
"RUN_OFFLINE = true");
885 Assert.IsNull(
lossSet.profile.min_loss,
"Expected min_loss to be null");
886 Assert.IsNull(
lossSet.profile.max_loss,
"Expected max_loss to be null");
887 Assert.IsNull(
lossSet.profile.avg_annual_loss,
"Expected avg_annual_loss to be null");
888 Assert.IsNull(
lossSet.profile.num_losses,
"Expected num_losses to be null");
889 Assert.IsNotNull(
lossSet.profile.currency,
"Currency was null");
890 Assert.IsNotNull(
lossSet.profile.attributes,
"Attributes was null");
891 Assert.AreEqual(
lossSet.profile.attributes.Count, 0,
"Expected attributes to be empty");
900 #region Set Up and Configuration
901 private const string TypeName =
"LoadedLossSet";
904 #endregion Set Up and Configuration
955 #region Set Up and Configuration
956 private const string TypeName =
"QCLSLossSet";
959 #endregion Set Up and Configuration
962 #region correlation_coefficient
998 #endregion correlation_coefficient
1000 #region distribution
1031 Samples.Distribution_UniformDistribution.AsReference
1045 Samples.Distribution_CustomSeasonalityDistribution.AsReference
1050 #endregion distribution
1073 #endregion simulation
1081 base.Test_LossSet_CreatesProfile();
1086 #endregion Other Loss Set Test Classes
1088 #region Abstract Base Test Classes
1094 private const string TypeName =
"ILossSet_Simulated";
1096 #region Abstract Members
1099 protected abstract string POSTDataWithReinstatements {
get; }
1100 #endregion Abstract Members
1109 #endregion trial_count
1125 #endregion start_date
1127 #region reinstatements_data_type
1145 #endregion reinstatements_data_type
1155 #endregion trial_count
1171 #endregion start_date
1173 #region reinstatements_data_type
1191 #endregion reinstatements_data_type
1194 #region Reinstatement Information Tests
1200 GenericTest.POST_ValidResourceWithData(LossSetWithReinstatements.Unposted
1201 .Change(
ls =>
ls.loss_type,
LossType.LossNetOfAggregateTerms),
1202 POSTDataWithReinstatements);
1210 GenericTest.POST_InvalidResourceWithData_Fails(LossSetWithReinstatements.Unposted
1211 .Change(
ls =>
ls.loss_type,
LossType.LossGross), POSTDataWithReinstatements,
1216 #region Test Different Wrapper Layer Types
1225 Assert.Inconclusive(
"RUN_OFFLINE = true");
1260 Assert.IsTrue(
rprem > 0,
"Expected some non-zero reinstatement premium.");
1279 Assert.AreEqual(0,
rprem,
$"Expected the reinstatement premium to be zero " +
1280 $"since the wrapper layer type {wrapperLayer.GetType()} has no premium property.");
1283 Assert.IsTrue(
rprem > 0,
"Expected some non-zero reinstatement premium.");
1289 Assert.AreEqual(0,
new_rprem,
"Expected the reinstatement premium to be zero since premium is zero.");
1295 Test_LossSet_ReinstatementInformation_Forwarded(
1302 Test_LossSet_ReinstatementInformation_Forwarded(
new CatXL
1314 Test_LossSet_ReinstatementInformation_Forwarded(
new AggXL
1327 Test_LossSet_ReinstatementInformation_Forwarded(
new Generic
1340 Test_LossSet_ReinstatementInformation_Forwarded(
new Filter { invert =
true });
1348 in_currency =
"USD",
1349 out_currency =
"CAD",
1353 #endregion Test Different Wrapper Layer Types
1356 #endregion Reinstatement Information Tests
1365 private const string TypeName =
"ELTLossSet";
1368 #region event_catalogs
1384 #endregion event_catalogs
1388 #region event_catalogs
1409 #endregion event_catalogs
1418 private const string TypeName =
"LossSetWithData";
1430 #region LossSet_WithCurrency
1442 POST_StringAttribute_Empty(
l =>
l.currency);
1464 PUT_StringAttribute_Empty(
l =>
l.currency);
1468 #endregion LossSet_WithCurrency
1489 #endregion loss_type
1496 Assert.Inconclusive(
"RUN_OFFLINE = true");
1497 T ls = TestResource_Existing;
1498 Assert.IsNotNull(
ls.profile,
"Profile was null");
1499 Assert.IsNotNull(
ls.profile.min_loss,
"min_loss was null");
1500 Assert.IsNotNull(
ls.profile.max_loss,
"max_loss was null");
1501 Assert.IsNotNull(
ls.profile.avg_annual_loss,
"avg_annual_loss was null");
1502 Assert.IsNotNull(
ls.profile.num_losses,
"num_losses was null");
1503 Assert.IsNotNull(
ls.profile.non_zero_losses,
"non_zero_losses was null");
1504 Assert.IsNotNull(
ls.profile.currency,
"Currency was null");
1505 Assert.IsNotNull(
ls.profile.attributes,
"Attributes was null");
1506 Assert.AreNotEqual(
ls.profile.attributes.Count, 0,
"Attributes were empty");
1529 #endregion loss_type
1537 private const string TypeName =
"LossSetWithLossType";
1549 POST_StringAttribute_Empty(
l =>
l.currency);
1560 private const string TypeName =
"LossSet";
1583 #endregion loss_type
1590 Assert.Inconclusive(
"RUN_OFFLINE = true");
1591 T ls = TestResource_Existing;
1592 Assert.IsNotNull(
ls.profile,
"Profile was null");
1593 Assert.IsNotNull(
ls.profile.min_loss,
"min_loss was null");
1594 Assert.IsNotNull(
ls.profile.max_loss,
"max_loss was null");
1595 Assert.IsNotNull(
ls.profile.avg_annual_loss,
"avg_annual_loss was null");
1596 Assert.IsNotNull(
ls.profile.num_losses,
"num_losses was null");
1597 Assert.IsNotNull(
ls.profile.non_zero_losses,
"non_zero_losses was null");
1598 Assert.IsNotNull(
ls.profile.currency,
"Currency was null");
1599 Assert.IsNotNull(
ls.profile.attributes,
"Attributes was null");
1600 Assert.AreNotEqual(
ls.profile.attributes.Count, 0,
"Attributes were empty");
1605 #endregion Abstract Base Test Classes
Tests for a stored resource collection which do not require an instance of that resource to be define...
A class containing a resource that can be Posted with dependencies.
Exposes the various sample CSV files as strings.
static string Loss_Set_1_Data
static string Loss_Set_2_Data
static string YELTLossSet_10Trials_ForBinary
static string YLTLossSet_WithReinstatements_10Trials
static string YELTLossSet_WithReinstatements_10Trials
static string YELTLossSet_10Trials
static string YLTLossSet_10Trials
Exposes sample resource objects, with built-in methods for injecting dependencies.
IInjectableResource< NegativeBinomialDistribution > Distribution_NegativeBinomialDistribution
IInjectableResource< CustomSeasonalityDistribution > Distribution_CustomSeasonalityDistribution
static readonly PollingOptions DataPollingOptions
Polling options to use when uploading a data file.
IInjectableResource< RangeFilter > LossFilter_RangeFilter
IInjectableResource< YELTLossSet > LossSet_YELTLossSet
IInjectableResource< PoissonDistribution > Distribution_PoissonDistribution
IInjectableResource< ELTLossSet > LossSet_ELTLossSet
IInjectableResource< NormalDistribution > Distribution_NormalDistribution
IInjectableResource< AggXL > Layer_AggXL
IInjectableResource< ILayerView< QuotaShare > > LayerView_QuotaShare
List< IInjectableResource< ILayer > > AllSaveableLayerTypesTestList
A list of one of each type of layer that can be POSTed. Layer types that cannot be posted on their ow...
IInjectableResource< OrFilter > LossFilter_OrFilter
IInjectableResource< LogNormalDistribution > Distribution_LogNormalDistribution
IInjectableResource< CustomSeverityDistribution > Distribution_CustomSeverityDistribution
IInjectableResource< NestedLayerLossSet > LossSet_NestedLayerLossSet
A simple NestedLayerLossSet retaining a CatXL layer's losses.
IInjectableResource< ILayerView< Filter > > LayerView_Filter
IInjectableResource< LoadedLossSet > LossSet_LoadedLossSet
A simple LoadedLossSet loading a ELTLossSets losses.
IInjectableResource< QCLSLossSet > LossSet_QCLSLossSet
IInjectableResource< VendorTreatyAnalysis > Analysis_VendorTreatyAnalysis
IInjectableResource< YELTLossSet > LossSet_YELTLossSetWithReinstatements
IInjectableResource< NestedLayerLossSet > GetInjectableNestedLayerLossSet(IInjectableResource< ILayer > layer, LossType? loss_type=null)
Factory for producing injectable NestedLayerLossSets using a POSTable injectable Layer for use in tes...
IInjectableResource< TreatyLossSet > LossSet_TreatyLossSet
IInjectableResource< ParametricLossSet > LossSet_ParametricLossSet
IInjectableResource< ParetoDistribution > Distribution_ParetoDistribution
IInjectableResource< AndFilter > LossFilter_AndFilter
IInjectableResource< VendorPortfolioAnalysis > Analysis_VendorPortfolioAnalysis
IInjectableResource< DiracDistribution > Distribution_DiracDistribution
IInjectableResource< BinomialDistribution > Distribution_BinomialDistribution
List< IInjectableResource< LossSet > > AllLossSetTypesTestList
One sample of each loss set type, all with the loss_type set to LossType.LossGross to maximize potent...
IInjectableResource< LTFilter > LossFilter_LTFilter
IInjectableResource< YLTLossSet > LossSet_YLTLossSet
IInjectableResource< LoadedLossSet > GetInjectableLoadedLossSet(IInjectableResource< LossSet > source, double load=1.0, LossType? loss_type=null)
Factory for producing injectable LoadedLossSets using a POSTable injectable Layer for use in testing.
IInjectableResource< AnyFilter > LossFilter_AnyFilter
IInjectableResource< YLTLossSet > LossSet_YLTLossSetWithReinstatements
IInjectableResource< GTFilter > LossFilter_GTFilter
IInjectableResource< AnyOfFilter > LossFilter_AnyOfFilter
IInjectableResource< CustomFrequencyDistribution > Distribution_CustomFrequencyDistribution
IInjectableResource< PortfolioLossSet > LossSet_PortfolioLossSet
Contains static helper methods for testing IAPIResourceView instances.
Includes tests that affect all types of ELTLossSet. Because these have a data endpoint,...
virtual void Test_ELTLossSet_PUT_EventCatalogs_Invalid()
virtual void Test_ELTLossSet_PUT_EventCatalogs_Empty()
virtual void Test_ELTLossSet_POST_EventCatalogs_Null()
virtual void Test_ELTLossSet_PUT_EventCatalogs_Null()
virtual void Test_ELTLossSet_POST_EventCatalogs_Invalid()
virtual void Test_ELTLossSet_POST_EventCatalogs_Empty()
virtual void Test_ELTLossSet_PUT_EventCatalogs()
static void Test_LossSet_Simulatable< T >(T posted)
Asserts that a loss set can be included in a layer_view and simulated without any issue.
override IResourceCollection< LossSet > collection_source
override IInjectableResource< ELTLossSet > TestInjectableResource
void Test_LoadedLossSet_POST_Load_NaN()
void Test_LoadedLossSet_POST_Load_NegativeInfinity()
void Test_LoadedLossSet_POST_Load_MinValue()
void Test_LoadedLossSet_POST_Load_Infinity()
void Test_LoadedLossSet_POST_Load_MaxValue()
void Test_LoadedLossSet_POST_Source_EveryType()
void Test_LoadedLossSet_POST_Load_HighPrecision()
override void Test_LossSet_POST_LossType_LossNetOfAggregateTerms()
override void Test_LossSet_CreatesProfile()
void Test_NestedLayerLossSet_POST_Layer_MixedLossSetTypes()
void Test_NestedLayerLossSet_POST_Layer_EveryType()
void Test_ParametricLossSet_POST_Frequency_Reference_NonExistantId()
void Test_ParametricLossSet_ARE6592()
void Test_ParametricLossSet_POST_StartDate_MinValue()
void Test_ParametricLossSet_POST_EventId_GreaterThanMaxValue()
void Test_ParametricLossSet_POST_StartDate_MaxValue()
void Test_ParametricLossSet_POST_EventId_Null()
void Test_ParametricLossSet_POST_Frequency_Reference_EmptyStringId()
void Test_ParametricLossSet_POST_Attributes_Null()
void Test_ParametricLossSet_POST_Attributes_Empty()
void Test_ParametricLossSet_POST_Severity_AllInvalidTypes()
void Test_ParametricLossSet_POST_Frequency_AllValidTypes()
void Test_ParametricLossSet_POST_Seasonality_AllInvalidTypes()
void Test_ParametricLossSet_POST_Frequency_Null()
void Test_ParametricLossSet_POST_Frequency_Reference_NullId()
void Test_ParametricLossSet_POST_Severity_Reference_NullId()
void Test_ParametricLossSet_POST_Frequency_AllInvalidTypes()
void Test_ParametricLossSet_POST_Seasonality_Reference_NullId()
void Test_LossSet_ParametricLossSet_NegativeProfile()
void Test_ParametricLossSet_POST_Severity_AllValidTypes()
void Test_ParametricLossSet_POST_EventId_MinValue()
void Test_ParametricLossSet_POST_Severity_Null()
void Test_ParametricLossSet_POST_Attributes_Multiple()
override void Test_LossSet_CreatesProfile()
void Test_ParametricLossSet_POST_Severity_Reference_EmptyStringId()
void Test_ParametricLossSet_POST_Seasonality_Reference_EmptyStringId()
void Test_ParametricLossSet_POST_Seasonality_Reference_NonExistantId()
void Test_ParametricLossSet_POST_Severity_Reference_NonExistantId()
void Test_ParametricLossSet_POST_Seasonality_AllValidTypes()
void Test_ParametricLossSet_POST_EventId_MaxValue()
void Test_ParametricLossSet_POST_Seasonality_Null()
void Test_LossSet_PUT_Perspective()
void Test_LossSet_POST_Perspective_Blank()
void Test_LossSet_PUT_Perspective_Null()
override IInjectableResource< PortfolioLossSet > TestInjectableResource
void Test_LossSet_POST_Perspective_Null()
void Test_LossSet_PUT_Analysis_Reference_NullId()
void Test_LossSet_PUT_Analysis()
void Test_LossSet_POST_Analysis_Null()
void Test_LossSet_PUT_Perspective_Blank()
void Test_LossSet_POST_Perspective_TooShort()
void Test_LossSet_PUT_Analysis_Reference_NonExistantId()
void Test_LossSet_PUT_Perspective_TooShort()
void Test_LossSet_POST_Analysis_Reference_EmptyStringId()
void Test_LossSet_PUT_Perspective_TooLong()
void Test_LossSet_PUT_Analysis_Reference_EmptyStringId()
void Test_LossSet_POST_Analysis_Reference_NullId()
void Test_LossSet_POST_Analysis_Reference_NonExistantId()
void Test_LossSet_POST_Perspective_TooLong()
void Test_QCLSLossSet_POST_CorrelationCoefficient_HighPrecision()
void Test_QCLSLossSet_POST_CorrelationCoefficient_GreaterThanMaxValue()
void Test_QCLSLossSet_POST_CorrelationCoefficient_NaN()
void Test_QCLSLossSet_POST_Distribution_AllInvalidTypes()
override void Test_LossSet_CreatesProfile()
void Test_QCLSLossSet_POST_Simulation_Reference_NonExistantId()
void Test_QCLSLossSet_POST_Distribution_Null()
void Test_QCLSLossSet_POST_Distribution_Reference_EmptyStringId()
void Test_QCLSLossSet_POST_CorrelationCoefficient_Zero()
void Test_QCLSLossSet_POST_Simulation_Reference_EmptyStringId()
void Test_QCLSLossSet_POST_CorrelationCoefficient_MinValue()
void Test_QCLSLossSet_POST_CorrelationCoefficient_MaxValue()
void Test_QCLSLossSet_POST_CorrelationCoefficient_LessThanMinValue()
void Test_QCLSLossSet_POST_Distribution_Reference_NullId()
void Test_QCLSLossSet_POST_Simulation_Reference_NullId()
void Test_QCLSLossSet_POST_Simulation_Null()
void Test_QCLSLossSet_POST_Distribution_Reference_NonExistantId()
void Test_QCLSLossSet_POST_Distribution_AllValidTypes()
Includes tests shared by both YLTLossSets and YELTLossSets.
void Test_LossSet_ReinstatementInformation_Forwarded_QuotaShare()
void Test_LossSet_ReinstatementInformation_Forwarded_FixedRateCurrencyConverter()
void Test_LossSet_PUT_StartDate_MaxValue()
void Test_LossSet_PUT_ReinstatementsDataType_Currency()
void Test_LossSet_ReinstatementInformation_Forwarded_AggXL()
void Test_LossSet_PUT_ReinstatementsDataType_Percentage()
void Test_LossSet_PUT_StartDate_MinValue()
void Test_LossSet_POST_LossNetOfAggregateTerms_ReinstatementInformation()
Assert that the system allows reinstatement information to exist in the file if the loss type is Loss...
void Test_LossSet_ReinstatementInformation_Forwarded_Generic()
void Test_LossSet_ReinstatementInformation_Forwarded_CatXL()
void Test_LossSet_POST_LossGross_ReinstatementInformation()
Assert that the system does not allow reinstatement information to exist in the file if the loss type...
void Test_LossSet_POST_ReinstatementsDataType_Percentage()
void Test_LossSet_POST_StartDate_MinValue()
void Test_LossSet_POST_StartDate_MaxValue()
void Test_LossSet_POST_ReinstatementsDataType_Currency()
void Test_LossSet_PUT_ReinstatementsDataType_Null()
void Test_LossSet_PUT_TrialCount()
void Test_LossSet_POST_ReinstatementsDataType_Null()
void Test_LossSet_ReinstatementInformation_Forwarded_FilterLayer()
void Test_LossSet_POST_TrialCount_Negative()
void Test_LossSet_POST_Analysis_Null()
void Test_LossSet_POST_Treaty_Null()
void Test_LossSet_PUT_Treaty()
void Test_LossSet_POST_Treaty_WithNullProperties()
override IInjectableResource< TreatyLossSet > TestInjectableResource
void Test_LossSet_PUT_Analysis()
void Test_LossSet_POST_Analysis_Reference_NonExistantId()
void Test_LossSet_PUT_Analysis_Reference_NullId()
void Test_LossSet_POST_Analysis_Reference_NullId()
void Test_LossSet_PUT_Analysis_Reference_EmptyStringId()
void Test_LossSet_POST_Analysis_Reference_EmptyStringId()
void Test_LossSet_PUT_Treaty_Null()
void Test_LossSet_PUT_Treaty_WithNullProperties()
void Test_LossSet_PUT_Analysis_Reference_NonExistantId()
virtual void Test_LossSet_WithCurrency_POST_Currency_Null()
virtual void Test_LossSet_WithCurrency_POST_Currency_Blank()
Includes tests that affect all LossSets that require data upload.
virtual void Test_LossSet_WithCurrency_POST_Currency_Blank()
virtual void Test_LossSet_WithCurrency_POST_Currency_Null()
override void AdditionalValidResourceWithDataTests(T posted)
void Test_LossSet_POST_LossType_LossNetOfAggregateTerms()
virtual void Test_LossSet_CreatesProfile()
void Test_LossSet_PUT_LossType_LossGross()
virtual void Test_LossSet_PUT_LossType_Null()
virtual void Test_LossSet_WithCurrency_PUT_Currency_Null()
void Test_LossSet_POST_LossType_Null()
virtual void Test_LossSet_WithCurrency_PUT_Currency()
void Test_LossSet_PUT_LossType_LossNetOfAggregateTerms()
virtual void Test_LossSet_WithCurrency_PUT_Currency_Blank()
void Test_LossSet_POST_LossType_LossGross()
override string POSTDataWithReinstatements
void Test_LossSet_PUT_DataType_CSV()
void Test_YELTLossSet_POST_EventCatalogs_Null()
override IInjectableResource< YELTLossSet > TestInjectableResource
override IInjectableResource< YELTLossSet > LossSetWithReinstatements
void Test_LossSet_PUT_DataType_Binary()
void Test_YELTLossSet_PUT_EventCatalogs_Null()
void Test_YELTLossSet_PUT_EventCatalogs_Invalid()
void Test_YELTLossSet_POST_EventCatalogs_Empty()
void Test_YELTLossSet_PUT_EventCatalogs()
void Test_YELTLossSet_POST_EventCatalogs_Invalid()
void Test_AnalysisProfile_POST_YeltLossSetSimulationFiltering()
void Test_LossSet_POST_DataType_Binary()
void Test_YELTLossSet_PUT_EventCatalogs_Empty()
void Test_LossSet_POST_DataType_CSV()
void Test_ParametricLossSet_POST_Attributes_Empty()
override IInjectableResource< YLTLossSet > TestInjectableResource
void Test_ParametricLossSet_POST_Attributes_Multiple()
void Test_LossSet_YLTLossSet_ProfileValid()
override void Test_LossSet_PUT_LossType_Null()
override string POSTDataWithReinstatements
override IInjectableResource< YLTLossSet > LossSetWithReinstatements
void Test_LossSet_YLTLossSet_NegativeLosses_Succeeds()
void Test_ParametricLossSet_PUT_Attributes_Empty()
void Test_ParametricLossSet_POST_Attributes_Null()
override LossType DefaultLossType
void Test_ParametricLossSet_PUT_Attributes_MixedTypes()
Includes tests that affect all types of LossSet.
virtual void Test_LossSet_POST_LossType_Null()
override void AdditionalValidResourceTests(T posted)
Deriving classes can optionally override this function to perform additional validation on every succ...
virtual void Test_LossSet_POST_LossType_LossGross()
virtual void Test_LossSet_POST_LossType_LossNetOfAggregateTerms()
virtual void Test_LossSet_CreatesProfile()
static void MethodIsAllowed(Action request, string methodName, bool methodAllowed=true)
Wrap a request in a tryGet with some formatting for testing purposes.
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...
Generic Unit test implementations that will test REST methods on arbitrary resources.
static void ExecuteWithConsoleErrorLogging(Action action, Func< string > additionalContext=null)
Wraps the call to the action with a try/catch that doesn't handle the exception, just logs some usefu...
A collection of filthy hacks to populate some fields of APIResources objects of any type.
A helper class containing default skip dates.
static void Validation(string ticket=null)
Skip a test due to a validation-related issue, possibly with no insight into when this issue is likel...
Class used in unit tests to mark tests as skipped by using Assert.Inconclusive() method.
static void Indefinitely(string ticket=null)
Skip the specified test.
Describes a collection of resources which can be listed.
API methods / requests made available to the user.
static readonly ResourceCollection< LossSet > LossSets
The collection of LossSets on the server.
Describes a distribution that always returns the same value. This distribution can be used as either ...
Exception raised when the commit process fails.
Representation of an Aggregate Catastrophe Excess of Loss layer.
Representation of a Catastrophe Excess of Loss (CatXL) layer.
Filter is like a layer whose 'terms' are to filter events out of the loss sources....
A structure that can be used to change the currency of a loss stream from one currency to another at ...
Representation of an Aggregate Catastrophe Excess of Loss layer with reinstatements.
Representation of a Quota Share contract.
Base class for all LossSet sub-types. A LossSet is a resource that generates sample (trial) losses wh...
LossType? loss_type
Indicates what types of losses are generated by this loss set. If not specified the server will defau...
Representation of a single loss set with an associated event loss table.
Base for all conventional loss sets, which generate losses, have a server-generated loss profile,...
Base for all loss sets for which pre-generated loss data must be uploaded.
Representation of a Nested layer loss set, which represents any loss set whose losses are derived fro...
Representation of a Parametric loss set.
Custom TreatyLossSet treaty reference type.
Representation of a TreatyLossSet.
Representation of a loss set with an associated year-event-loss table.
DataType
The format of the data uploaded against this YELT.
Representation of a loss set with an associated simulated yearly losses table.
Optional parameters which can be specified for all metrics requests.
Representation of a monetary value with a currency.
The loss perspective determines what factors to include when computing a distribution.
static readonly Perspective ReinstatementPremium
Construct a distribution from the structure's net reinstatement premiums.
Determines the behaviour of the API when automatically retrying a request whose result is not yet rea...
IReference< T > AsReference
A reference to the posted resource.
T Unposted
The unPOSTed resource definition.
Abstract representation of a layer with terms.
Abstract representation of a layer with terms.
An interface for pre-simulated loss sets some data associated with them, some hard-coded seasonality ...
Combines the interfaces for a loss set and a resource with a data endpoint.
LossType
Indicates what types of losses are generated by this loss set.
ReinstatementsDataType
Dictates how any reinstatement information associated with a loss set should be interpreted.
@ currency
Reinstatement values represent a fixed dollar amount.