Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1003423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:58:41+00:00 2026-05-16T07:58:41+00:00

I have this first integration test for a tic tac toe game: [TestClass] public

  • 0

I have this first integration test for a tic tac toe game:

[TestClass]
public class FirstIntegrationTest
{
    [TestMethod, TestCategory("Integration Tests")]
    public void Standard_TicTacToe_Game_PlayerO_Wins()
    {
        IPlayer playerO = new Player();
        IPlayer playerX = new Player();

        Game game = new Game(playerO, playerX);
        game.Start();

        playerO.Play(new Point(0, 0));
        playerX.Play(new Point(2, 2));
        playerO.Play(new Point(1, 0));
        playerX.Play(new Point(1, 2));
        playerO.Play(new Point(2, 0));

        Assert.IsTrue(game.IsOver);
        Assert.IsTrue(playerO.HasWon);
        Assert.IsFalse(playerX.HasWon);
    }
}

Later I will add at least another one that takes care of showing up on to the User the board of the game. For the current one, I am only interested in what is shown above.

When doing integration tests (and this is an integration test, I suppose?) what kind of Unit-Tests should I do? Should I just make the minimum just to make the Integration Test pass? If that is so, I’d only need to make the Game class set its first IPlayer HasWon to true and the second one to false. What would be the point of Unit-Testing at all if I’m driving my design by the integration tests?

I have the idea that generally you don’t have a lot of integration tests. So, should I be driving my design by Integration-Tests or by Unit-Tests?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:58:42+00:00Added an answer on May 16, 2026 at 7:58 am

    algorithms are always the hardest to test, because to be truly sure it works, you have to test every possible combination of everything. Realistically, its up to you to decide where to draw the line.

    What you have here is a high level acceptance test.

    possible unit tests are:

    • ensure players can only take turns alternately
    • ensure players can’t both mark a coordiate
    • ensure wins in veritcal, diagonal and horizonal are recognised (could test all 8 possibilities here)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Dozer to map two objects, I have: /** /* This first class uses
I have this class file call SMSHelper.cs First I just wanted to know is
I have this middleware which is the first: class RedirectIt require net/https require uri
I have this view (DetailsContainer, first class in code section of this question) with
I have this issue: first, I execute a SQL query using Java and then
I have this code: tableList = [[NSMutableArray alloc] initWithObjects:@First View,@Second View,nil]; I have synthesized
i have two arrays like this first array Array ( [0228] => Array (
I have this file which I need to read the first bytes to check
I have this select insert into test(t_name) (select users.first_name || '_' || users.last_name ||
I have this code. Only the first drawLine gets drawn and the rest 2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.