public void TestGDCNegativePositiveValues() { //arrange int a = -4; int b = 180; int testResult = 4; long time = 0; //act EuclidMethods testEuclid = new EuclidMethods(); int result = testEuclid.GetGDCEuclideanMethod(a, b, out time); //assert Assert.AreEqual(testResult, result, 0.001, "Something went wrong"); }
public void TestSteinWithNegativePositiveValues() { //arrange int a = -15; int b = 170; int testResult = 5; long time = 0; //act EuclidMethods testEuclid = new EuclidMethods(); int result = testEuclid.GetGCDStain(a, b, out time); //assert Assert.AreEqual(testResult, result, 0.001, "Something went wrong"); }
public void TestGDC3Positive1NegativeValues() { //arrange int a = 5; int b = -155; int c = 1455; int d = 204520; int testResult = 5; long time = 0; //act EuclidMethods testEuclid = new EuclidMethods(); int result = testEuclid.GetGDCEuclideanMethod(a, b, c, d, out time); //assert Assert.AreEqual(testResult, result, 0.001, "Something went wrong"); }
public void TestGDC4EqualValues() { //arrange int a = 4312; int b = 4312; int c = 4312; int d = 4312; int testResult = 4312; long time = 0; //act EuclidMethods testEuclid = new EuclidMethods(); int result = testEuclid.GetGDCEuclideanMethod(a, b, c, d, out time); //assert Assert.AreEqual(testResult, result, 0.001, "Something went wrong"); }