Challenge: Implementing Functionality under Test

Test yourself by implementing functionality under test in an AWS Lambda application.

Test-driven development (TDD) is a technique where developers write tests before writing code. This technique allows the tests to aid in the design of the code. For example, we would be able to think of all the scenarios, edge cases, and boundary conditions before any code is even written.

This is what we’re doing in the playground below. We have the tests for a function handler already defined. Here are the requirements of the handler.

  • It must return the count of the vowels in the input text.

  • It needs to do so in a case-insensitive manner.

  • It only counts unique letters and doesn’t count duplicate occurrences more than once.

The handler can be found inside the Function.cs file of the MainApp project. We already have a collection of vowel characters defined. But if we run the tests, all of them will fail because the handler throws an exception. Our goal is to implement the required functionality and make all the tests pass.

Get hands-on with 1400+ tech skills courses.