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 7170731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:16:16+00:00 2026-05-28T15:16:16+00:00

I am constructing a prototype for robot using Test driven development ( C#, Console

  • 0

I am constructing a prototype for robot using Test driven development ( C#, Console Application). First, I have created a test project and a class RobotTest. Here, I have written test methods to fail and to pass I construct the Robot class. Then, I have created a class RobertPrototype in which Robot class object is created to use methods in the Robot class. Along with that, I added some other methods (to parse input) in RobertPrototype.

I don’t know if this is the way I have to follow while developing through TDD. Do I have to include all methods in Robot class itself ?

Please guide me. Thanks.

  • 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-28T15:16:17+00:00Added an answer on May 28, 2026 at 3:16 pm

    Do I have to include all methods in Robot class itself ?

    I don’t understand the question. you already said your tests are in a separate project and that you are writing a separate client class RobotPrototype that uses the Robot class.

    At this point it seems like a reasonable design.

    I think you’re confusing yourself by writing bits of all of your classes for each bit of “working” test that you write for some Robot class method. This is not the way to think about TDD. It DOES NOT mean write a failing test to create a Robot object, then write a shell of a Robot constructor, write a shell of a class that uses a robot, write a shell of a client that uses a RobotPrototype. Then write a failing test, then write an empty Robot method, write RobotPrototype code that uses that method, write client code that uses what the RobotPrototype uses. no, no, no.

    Each class in your robot design will have it’s own corresponding Test class. Each method in each class will have it’s own corresponding method in it’s corresponding test class. The TDD cycle is performed on a method-by-method basis.

    Try this:

    • Focus on one class and it’s corresponding test class. Clearly you need a Robot before anything else. Start with the Robot class.
    • Using the TDD cycle, write functional methods.
    • When you have enough Robot functionality to do something, then you can start writing some Robot-using code (RobotPrototype class).
    • The RobotPrototype class has it’s own corresponding Test class. Each of it’s methods will have a corresponding Test method. You should have written enough Robot functionality to complete any given RobotPrototype method. If not, stop. Go back to Robot and write functioning methods there.

    Given the above, the points to take away are:

    • You wrote complete “core” methods first. Each method has working tests when you’re done.

    • As write new code using existing code, you know that existing code works because it’s been tested. And, your new code has it’s own tests.

    • Thus your application is built up upon layers of tested code.

    • As you write and re-write, you constantly re-run your tests. And periodically make sure you rerun ALL of them. If a previously working test fails, well you know you have a problem and you know where to look first.

    • As much as practicable every class has a test class and every method has (at least one) test method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm constructing an ecommerce application in Symfony, and I have a page which lists
I'm constructing a fluent interface where I have a base class that contains the
I am constructing a large HTML document from fragments supplied by users that have
We are constructing an application that will be interacting with Exchange 2007 calendar functions.
I am constructing a page using Editor Templates and composition. My view model contains
I am constructing an application which will be able to output data to RSS
I am constructing a search function in a class to be used by several
I'm constructing a simple search form for our support ticket database using Lucene.Net, and
I'm constructing a prototype site for my company, which has several thousand employees and
I'm having trouble constructing an efficient query in EF4 using type per table (TPT)

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.