Skip to content

Commit

Permalink
BHoM_Engine: documentation compliance fixed (#3440)
Browse files Browse the repository at this point in the history
  • Loading branch information
IsakNaslundBh authored Dec 11, 2024
2 parents 5a5deb6 + c388f99 commit 4eac991
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .ci/unit-tests/Base_Engine_Tests/Compute/TryRunExtensionMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ namespace BH.Tests.Engine.Base.Compute
public class TryRunExtensionMethodTests
{
[Test]
[Description("Tests Compute.TryRunExtensionMethod by calling IExtensionMethodToCallHelper interface method with objects of types provided in name of this method." +
"\n Underlying ExtensionMethodToCallHelper method to which the call is dispatched should return the value set in 'expected' variable.")]
public void BarDoubleDoubleDouble()
{
Bar bar = new Bar();
Expand All @@ -38,6 +40,8 @@ public void BarDoubleDoubleDouble()
}

[Test]
[Description("Tests Compute.TryRunExtensionMethod by calling IExtensionMethodToCallHelper interface method with objects of types provided in name of this method." +
"\n Underlying ExtensionMethodToCallHelper method to which the call is dispatched should return the value set in 'expected' variable.")]
public void BarBarDoubleDouble()
{
Bar bar = new Bar();
Expand All @@ -48,6 +52,8 @@ public void BarBarDoubleDouble()
}

[Test]
[Description("Tests Compute.TryRunExtensionMethod by calling IExtensionMethodToCallHelper interface method with objects of types provided in name of this method." +
"\n Underlying ExtensionMethodToCallHelper method to which the call is dispatched should return the value set in 'expected' variable.")]
public void BarBarBarDouble()
{
Bar bar = new Bar();
Expand All @@ -58,6 +64,8 @@ public void BarBarBarDouble()
}

[Test]
[Description("Tests Compute.TryRunExtensionMethod by calling IExtensionMethodToCallHelper interface method with objects of types provided in name of this method." +
"\n Underlying ExtensionMethodToCallHelper method to which the call is dispatched should return the value set in 'expected' variable.")]
public void BarBarBarBar()
{
Bar bar = new Bar();
Expand All @@ -67,6 +75,8 @@ public void BarBarBarBar()
}

[Test]
[Description("Tests Compute.TryRunExtensionMethod by calling IExtensionMethodToCallHelper interface method with objects of types provided in name of this method." +
"\n Underlying ExtensionMethodToCallHelper method to which the call is dispatched should return the value set in 'expected' variable.")]
public void BarBarPanelDouble()
{
Bar bar = new Bar();
Expand All @@ -78,6 +88,8 @@ public void BarBarPanelDouble()
}

[Test]
[Description("Tests Compute.TryRunExtensionMethod by calling IExtensionMethodToCallHelper interface method with objects of types provided in name of this method." +
"\n Underlying ExtensionMethodToCallHelper method to which the call is dispatched should return the value set in 'expected' variable.")]
public void PanelDoubleDoubleDouble()
{
Panel panel = new Panel();
Expand All @@ -88,6 +100,8 @@ public void PanelDoubleDoubleDouble()
}

[Test]
[Description("Tests Compute.TryRunExtensionMethod by calling IExtensionMethodToCallHelper interface method with objects of types provided in name of this method." +
"\n Underlying ExtensionMethodToCallHelper method to which the call is dispatched should return the value set in 'expected' variable.")]
public void BarNullPanelNull()
{
Bar bar = new Bar();
Expand All @@ -98,6 +112,8 @@ public void BarNullPanelNull()
}

[Test]
[Description("Tests Compute.TryRunExtensionMethod by calling IExtensionMethodToCallHelper interface method with objects of types provided in name of this method." +
"\n Underlying ExtensionMethodToCallHelper method to which the call is dispatched should return the value set in 'expected' variable.")]
public void PanelPanelPanelDouble()
{
Panel panel = new Panel();
Expand All @@ -108,6 +124,8 @@ public void PanelPanelPanelDouble()
}

[Test]
[Description("Tests Compute.TryRunExtensionMethod by calling IExtensionMethodToCallHelper interface method with objects of types provided in name of this method." +
"\n Underlying ExtensionMethodToCallHelper method to which the call is dispatched should return the value set in 'expected' variable.")]
public void BarDoubleNullNull()
{
Bar bar = new Bar();
Expand All @@ -118,6 +136,8 @@ public void BarDoubleNullNull()
}

[Test]
[Description("Tests Compute.TryRunExtensionMethod by calling IExtensionMethodToCallHelper interface method with objects of types provided in name of this method." +
"\n Underlying ExtensionMethodToCallHelper method to which the call is dispatched should return the value set in 'expected' variable.")]
public void BarNullNullBar()
{
Bar bar = new Bar();
Expand All @@ -127,6 +147,8 @@ public void BarNullNullBar()
}

[Test]
[Description("Tests Compute.TryRunExtensionMethod by calling IExtensionMethodToCallHelper interface method with objects of types provided in name of this method." +
"\n Underlying ExtensionMethodToCallHelper method to which the call is dispatched should return the value set in 'expected' variable.")]
public void BarNullNullNull()
{
Bar bar = new Bar();
Expand All @@ -136,6 +158,8 @@ public void BarNullNullNull()
}

[Test]
[Description("Tests Compute.TryRunExtensionMethod by calling IExtensionMethodToCallHelper interface method with objects of types provided in name of this method." +
"\n Underlying ExtensionMethodToCallHelper method to which the call is dispatched should return the value set in 'expected' variable.")]
public void NullDoubleDoubleDouble()
{
Bar bar = new Bar();
Expand All @@ -146,6 +170,8 @@ public void NullDoubleDoubleDouble()
}

[Test]
[Description("Tests Compute.TryRunExtensionMethod by calling IExtensionMethodToCallHelper interface method with objects of types provided in name of this method." +
"\n Underlying ExtensionMethodToCallHelper method to which the call is dispatched should return the value set in 'expected' variable.")]
public void NullNullNullNull()
{
Bar bar = new Bar();
Expand Down
4 changes: 4 additions & 0 deletions BHoM_Engine/Query/NumericalApproximation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public static double NumericalApproximation(this int number, string fullName = n
/***************************************************/

[Description("Compute the approximation of a floating-point number given specific settings.")]
[Input("number", "Floating-point number to approximate.")]
[Input("fullName", "Name of the number or of the property that holds this number. This name will be used to seek any matching custom tolerance/significant figure to apply for this approximation.")]
[Input("customNumericTolerances", "Named custom numeric tolerances to be used for this approximation. If the `fullName` input matches any of these, it will be used. Wildcards are supported.")]
[Input("globalNumericTolerance", "Fallback numeric tolerance to be used if no matching customNumericTolerance is found.")]
Expand Down Expand Up @@ -111,6 +112,7 @@ public static double NumericalApproximation(this double number, string fullName
/***************************************************/

[Description("Compute the approximation of an integer number given specific settings.")]
[Input("number", "Integer number to approximate.")]
[Input("fullName", "Name of the number or of the property that holds this number. This name will be used to seek any matching custom tolerance/significant figure to apply for this approximation.")]
[Input("customSignificantFigures", "Named custom significant figures to be used for this approximation. If the `fullName` input matches any of these, it will be used. Wildcards are supported.")]
[Input("globalSignificantFigures", "Fallback significant figures to be used if no matching customNumericTolerance is found.")]
Expand All @@ -132,6 +134,8 @@ public static int NumericalApproximation(this int number, string fullName = null

return number;
}

/***************************************************/
}
}

Expand Down

0 comments on commit 4eac991

Please sign in to comment.