Skip to content

mlvandijk/tdd-ai-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Examples to use for TDD or Test-First with AI

Try them out with JetBrains AI Assistant or JetBrains Junie coding agent.

Example 1: FizzBuzz

With AI Assistant

  • Open file FizzBuzzTest
  • Open AI Assistant chat
  • Ask AI Assistant: "Implement code that passes the tests"
  • Make sure the file is attached to the prompt
  • Copy the provided code to the right location
  • Run tests

With Junie

  • Ask Junie: "Implement code that passes the tests in FizzBuzzTest.java"
  • Click "Run tests" when Junie asks to run the tests

Example 2: Calculator

With AI Assistant

  • Open file CalculatorTest
  • Open AI Assistant chat
  • Ask AI Assistant: "Implement code that passes the tests"
  • Make sure the file is attached to the prompt
  • Copy the provided code to the right location
  • Run tests Note: Since this example requires multiple classes/files to be created, AI Assistant isn't always able to solve it.

With Junie

  • Ask Junie: "Implement code that passes the tests in CalculatorTest.java"
  • Click "Run tests" when Junie asks to run the tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages