-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-SensorParametersInternal now has an internal constructor
-Improved integration test handling of repairing a renamed probe name -Implemented additional request engine, SetObjectPropertyParameter unit tests -XmlDoc improvements
- Loading branch information
Showing
49 changed files
with
587 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 2 additions & 7 deletions
9
PrtgAPI.Tests.UnitTests/ObjectTests/CSharp/GetSensorHistoryTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 2 additions & 5 deletions
7
PrtgAPI.Tests.UnitTests/ObjectTests/CSharp/SetNotificationTriggerTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...Tests.UnitTests/ObjectTests/CSharp/SetObjectPropertyParameters/FakeMultipleFormattable.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace PrtgAPI.Tests.UnitTests.ObjectTests | ||
{ | ||
class FakeMultipleFormattable : IFormattableMultiple | ||
{ | ||
public string GetSerializedFormat() | ||
{ | ||
return "firstValue"; | ||
} | ||
|
||
public string[] GetSerializedFormats() | ||
{ | ||
return new[] {"firstValue", "secondValue"}; | ||
} | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
PrtgAPI.Tests.UnitTests/ObjectTests/CSharp/SetObjectPropertyParameters/FakeObjectProperty.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
using PrtgAPI.Attributes; | ||
|
||
namespace PrtgAPI.Tests.UnitTests.ObjectTests | ||
{ | ||
enum FakeObjectProperty | ||
{ | ||
#region SetObjectPropertyParameters | ||
|
||
[TypeLookup(typeof(FakeSettings))] | ||
NormalProperty, | ||
|
||
[TypeLookup(typeof(FakeSettings))] | ||
[System.ComponentModel.Description("missingxmlelementbuthasdescription")] | ||
MissingXmlElementButHasDescription, | ||
|
||
[TypeLookup(typeof(FakeSettings))] | ||
MissingXmlElementAndDescription, | ||
|
||
MissingTypeLookup, | ||
|
||
[TypeLookup(typeof(FakeSettings))] | ||
[SecondaryProperty(nameof(SecondaryProperty))] | ||
HasSecondaryProperty, | ||
|
||
SecondaryProperty, | ||
|
||
[TypeLookup(typeof(FakeSettings))] | ||
MissingFromTypeLookupTarget, | ||
|
||
[TypeLookup(typeof(FakeSettings))] | ||
ParentProperty, | ||
|
||
[DependentProperty(nameof(ParentProperty), "value")] | ||
ChildProperty, | ||
|
||
[TypeLookup(typeof(FakeSettings))] | ||
ParentOfWrongType, | ||
|
||
[DependentProperty(nameof(ParentOfWrongType), true)] | ||
ChildWithWrongType, | ||
|
||
[TypeLookup(typeof(FakeSettings))] | ||
ParentOfReverseDependencyMissingTypeLookup, | ||
|
||
[DependentProperty(nameof(ParentOfReverseDependencyMissingTypeLookup), "value", true)] | ||
ChildPropertyWithReverseDependencyAndIsMissingTypeLookup, | ||
|
||
[TypeLookup(typeof(FakeSettings))] | ||
ParentOfReverseDependency, | ||
|
||
[TypeLookup(typeof(FakeSettings))] | ||
[DependentProperty(nameof(ParentOfReverseDependency), "value", true)] | ||
ChildPropertyWithReverseDependency, | ||
|
||
[TypeLookup(typeof(FakeSettings))] | ||
[DependentProperty(nameof(ParentOfReverseDependency), "value1", true)] | ||
ChildPropertyWithReverseDependencyAndWrongValue, | ||
|
||
[TypeLookup(typeof(FakeSettings))] | ||
[DependentProperty(nameof(ChildPropertyWithReverseDependencyAndWrongValue), "blah", true)] | ||
GrandChildProperty, | ||
|
||
PropertyParameterProperty, | ||
|
||
#endregion SetObjectPropertyParameters | ||
#region DynamicPropertyTypeParser | ||
|
||
[TypeLookup(typeof(FakeSettings))] | ||
ArrayProperty | ||
|
||
#endregion | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...itTests/ObjectTests/CSharp/SetObjectPropertyParameters/FakeSetObjectPropertyParameters.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Reflection; | ||
using PrtgAPI.Parameters; | ||
|
||
namespace PrtgAPI.Tests.UnitTests.ObjectTests | ||
{ | ||
class FakeSetObjectPropertyParameters : BaseSetObjectPropertyParameters<FakeObjectProperty> | ||
{ | ||
private Func<Enum, PropertyInfo> getPropertyInfo; | ||
|
||
public FakeSetObjectPropertyParameters(Func<Enum, PropertyInfo> getPropertyInfo) | ||
{ | ||
this.getPropertyInfo = getPropertyInfo; | ||
} | ||
|
||
public void AddValue(Enum property, object value, bool disableDependentsOnNotReqiuiredValue) | ||
{ | ||
AddTypeSafeValue(property, value, disableDependentsOnNotReqiuiredValue); | ||
} | ||
|
||
protected override PropertyInfo GetPropertyInfo(Enum property) | ||
{ | ||
return getPropertyInfo(property); | ||
} | ||
} | ||
} |
Oops, something went wrong.