Jump to ratings and reviews
Rate this book

Concurrent Golang Solution for Parametrized Fizzbuzz. Unit Testing for All Possible Input Combinations: How to Build and Deploy Production-Grade Concurrent Go (Golang) projects.

Rate this book
The parametric FizzBuzz problem is more interesting than the original. And what about unit testing it for all possible combinations of input?

The FizzBuzz game is a simple programming exercise that can be used to help kids learn division. In the game, players count from one to some number, and if a number is divisible by three, they say "Fizz" instead of the number. If the number is divisible by five, they say "Buzz," and if the number is divisible by both three and five, they say "FizzBuzz."

There are a few different ways to write unit tests for parametric FizzBuzz. One way would be to create a test case for each possible input value, and assert that the output of the FizzBuzz function is the expected output for that input. Another way would be to create a test case for each possible output value, and assert that the input to the FizzBuzz function produces that output.

In this approach, you would create a test case for each possible input value, and assert that the output of the FizzBuzz function is the expected output for that input. For example, you would have a test case for the input 3, and assert that the output is "Fizz".



- This approach is very thorough, and ensures that your FizzBuzz function works correctly for all possible input values.



- This approach can be time-consuming to set up, especially if there are a lot of possible input values.
- This approach can also be difficult to maintain, as you need to update the test cases whenever the expected output of the FizzBuzz function changes.

60 pages, Kindle Edition

Published June 12, 2022

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
0 (0%)
4 stars
0 (0%)
3 stars
1 (100%)
2 stars
0 (0%)
1 star
0 (0%)
No one has reviewed this book yet.

Can't find what you're looking for?

Get help and learn more about the design.