public void Classifier_Equilateral_ExpectCorrectAnswer() { // Arrange var triangleSideLengths = new TriangleSideLengths { LengthOfSideA = 12, LengthOfSideB = 12, LengthOfSideC = 12 }; // Act _triangleClassifier.Classify(triangleSideLengths); // Assert Assert.IsTrue(_testOutputter.WriteLineWasCalled, "Outputter.WriteLine should have been called."); Assert.AreEqual("All sides have the same length. That means that the triangle is equilateral.", _testOutputter.WriteLineTestValue, "Outputter.WriteLine should have been called with the correct text."); }
public static void Main(string[] args) { var triangleClassifier = new TriangleClassifier(); var triangleSideLengths = triangleClassifier.ParseAndValidateCommandLineArguments(args); if (triangleSideLengths != null) { triangleClassifier.Classify(triangleSideLengths); } }
private void calculateClassification() { _type = TriangleClassifier.Classify(this); }