Created
September 14, 2012 15:11
-
-
Save cubanx/3722533 to your computer and use it in GitHub Desktop.
YUNO Maths good?
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
[Test] | |
public void It_should_play() { | |
int completeAttestations = 38; | |
int totalAttestations = 84; | |
Expect(Math.Round((double)((completeAttestations * 100) / totalAttestations)), EqualTo(Math.Round(completeAttestations * 100d / totalAttestations))); | |
var actualUnrounded = (double)((completeAttestations * 100) / totalAttestations); | |
var expectedUnrounded = completeAttestations * 100d / totalAttestations; | |
Expect(actualUnrounded, EqualTo(expectedUnrounded), "Actual: <{0}>, Expected: <{1}>".FormatWith(actualUnrounded, expectedUnrounded)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment