Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
JosueNina committed Dec 20, 2024
1 parent 5c4eb42 commit 0d022c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tests/Indicators/IndicatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public void UpdatesProperly()
}

[Test]
public void ThrowsOnDifferentDataType()
public void ShouldNotThrowOnDifferentDataType()
{
var target = new TestIndicator();
Assert.Throws<ArgumentException>(() =>
Assert.DoesNotThrow(() =>
{
target.Update(new Tick());
}, "expected to be of type");
});
}

[Test]
Expand Down Expand Up @@ -174,7 +174,7 @@ public void IndicatorMustBeEqualToItself()
{
try
{
instantiatedIndicator = Activator.CreateInstance(indicator, new object[] {10});
instantiatedIndicator = Activator.CreateInstance(indicator, new object[] { 10 });
counter++;
}
catch (Exception)
Expand Down Expand Up @@ -364,7 +364,7 @@ private static MethodInfo GetOperatorMethodInfo<T>(string @operator, int argInde
{
var methodName = "op_" + @operator;
var method =
typeof (IndicatorBase).GetMethods(BindingFlags.Static | BindingFlags.Public)
typeof(IndicatorBase).GetMethods(BindingFlags.Static | BindingFlags.Public)
.SingleOrDefault(x => x.Name == methodName && x.GetParameters()[argIndex].ParameterType == typeof(T));

if (method == null)
Expand Down

0 comments on commit 0d022c8

Please sign in to comment.