Example #1
0
        public void GetOrdinalRepresentation_ForSingleDigit_ShouldSetCorrectSuffix(int inputNumber, string expected)
        {
            // Act
            var ordinalRepresentation = _ordinalNumbersService.GetOrdinalRepresentation(inputNumber);

            // Assert
            Assert.AreEqual(expected, ordinalRepresentation);
        }
Example #2
0
        static void Main(string[] args)
        {
            var ordinalNumbersService = new OrdinalNumbersService();
            var ordinalRepresentation = ordinalNumbersService.GetOrdinalRepresentation(21);

            Console.WriteLine($"Calculated ordinal representation of 21 is {ordinalRepresentation}. Expected was 21st");

            var creditMaskingService   = new CreditCardService();
            var maskedCreditCardNumber = creditMaskingService.Maskify("5512-4543-4434-2333");

            Console.WriteLine($"Calculated masked credit number of 5512-4543-4434-2333 is {maskedCreditCardNumber}. Expected was 5###-####-####-2333");
        }