public void Call_TranslateChequeToWords_WithDecimalValue_ShouldResutrnCorrentStringValue() { //ACT var result = _checkqueTranslator.TranslateChequeToWords("Saqib", 50263.63m); // Assert Assert.AreEqual("FIFTY THOUSAND TWO HUNDRED SIXTY THREE DOLLER(S) AND SIXTY THREE CENTS", result.AmountInWords); }
public void Call_TranslateMethod_ByProviding_NameAndAmount_ShouldCallTranslatorComponent() { //Arrange var writer = _checkqueTranslator.TranslateChequeToWords("Saqib", 3025.36m).Returns(_checqueResult); //ACT _controller.Translate("Saqib", 3025.36m); // Assert _checkqueTranslator.Received(1); // should be call and only one per request }
public HttpResponseMessage Translate(string name, decimal?number) => ServiceAction(() => { return(_iNumbersToWordsCompoent.TranslateChequeToWords(name, number.Value)); }, $"Translate {number} into Words");