public void Normalise_StateUnderTest_ExpectedBehaviour(double[] vector, double[] expected) { // Arrange var vectorNormalisation = new VectorNormalisation(); // Act var result = vectorNormalisation.Normalise(vector); // Assert result.Should().Equal(expected, (a, b) => AreApproximatelyEqual(a, b, 1e-1)); }
public void Normalise_TakeInList_ExpectedBehaviour(double[] vector, double[] expected) { // Arrange var vectorList = vector.ToList(); var expectedIEnumerable = expected.ToList(); var vectorNormalisation = new VectorNormalisation(); // Act var result = vectorNormalisation.Normalise(vectorList); // Assert result.Should().Equal(expectedIEnumerable, (a, b) => AreApproximatelyEqual(a, b, 1e-1)); }