Exemplo n.º 1
0
        public void ProcessConversion_InvalidAmount_ThrowsException()
        {
            //Arrange
            var chequeDetails = new ChequeDetails()
            {
                Name = "Ramesh", AmountInNumbers = 0
            };
            ChequeService chequeService = new ChequeService();

            //Act & Assert
            chequeService.ProcessConversion(chequeDetails);
        }
Exemplo n.º 2
0
        public void ProcessConversion_ValidAmount_ReturnsChequeDetails()
        {
            //Arrange
            var expected      = "one million and twenty-four thousand and one hundred and one dollars".FormatAmountToAllCapital();
            var chequeDetails = new ChequeDetails()
            {
                Name = "Ramesh", AmountInNumbers = 1024101
            };
            ChequeService chequeService = new ChequeService();

            //Act
            var actual = chequeService.ProcessConversion(chequeDetails);

            //Assert
            Assert.AreEqual(expected, actual.AmountInWords);
        }