-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean implementation of complex calculator #3
base: master
Are you sure you want to change the base?
Conversation
Also deleted the initial test class
Allows user to input 2 complex numbers and it adds them
3d20921
to
3faf417
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mis-spelling of Modulus
@@ -29,5 +29,18 @@ public void WhenImaginaryPartSet_ItCanBeReturned() | |||
// Assert | |||
Assert.Equal(13, num.Imaginary); | |||
} | |||
|
|||
[Fact] | |||
public void WhenModulousIsCalled_ItIsCalculatedAndReturned() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be Modulus
not Modulous
var num = new ComplexNumber { Real = 3, Imaginary = 4 }; | ||
|
||
// Act | ||
var mod = num.Modulous(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be Modulus
not Modulous
@@ -7,5 +7,10 @@ public class ComplexNumber | |||
public double Real { get; set; } | |||
|
|||
public double Imaginary { get; set; } | |||
|
|||
public double Modulous() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be Modulus
not Modulous
|
||
var c3 = c1.Add(c2); | ||
|
||
Console.WriteLine("{0} + {1} = {2} with modulous {3}", c1, c2, c3, c3.Modulous()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be Modulus
not Modulous
Demonstration of Opinionated GIT