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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:25:05+00:00 2026-06-03T06:25:05+00:00

I am willing to generate some documentation through my test. So far my test

  • 0

I am willing to generate some documentation through my test. So far my test look like this :

 public class creation_of_a_new_inventory_item : BaseClass<CreateInventoryItem>
    {
    private Guid _Id = Guid.NewGuid();
    private string _Name = "test";

    public override CommandHandler<CreateInventoryItem> OnHandle(IRepository repository)
    {
        return  new CreateInventoryItemHandler(repository);
    }

    protected override IEnumerable<IEvent> Given()
    {
        yield break;
    }

    protected override CreateInventoryItem When()
    {
        return new CreateInventoryItem()
        {
            Id = _Id,
            Name = _Name
        };
    }

    protected override IEnumerable<IEvent> Expect()
    {
        yield return new InventoryItemCreatedAdded()
                         {
                             Id = _Id,
                             Name = _Name
                         };
    }

   [Test]
    public void does_not_throw_an_Exception()
    {
        Assert.IsNull(Caught);
    }
}

Unfortunately, when using Nunit, I struggle at getting the informations I need in order to generate some pretty and easy to read documentation.

Is there any of you using Nunit to do that? Could you point me some interesting resource, I would have overlooked on the net? Do you generate documentation out of your test using other tools?

[edit]
My intent was to produce outof my code something like this :

 creation of a new inventory item
     When I Create Inventory Item 
        Id:{id},
        Name:{name}
     Then 
         Inventory Item is Created ({Success/Fail})
             Id:{id},
             Name:{name} 
     And does not throw an Exception ({Success/Fail})

This would do for a first approach. I might change things later, but the main goal would be this. My aim is to be able to write something my boss might understand without letting him enter the code.

[/edit]

  • 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-06-03T06:25:06+00:00Added an answer on June 3, 2026 at 6:25 am

    Don’t bother with NUnit. Just scan you assembly using reflection. The structure of you test fixture will alway be the same, so it extremely easy to generate documentation. Also you can add smth like Description() formatting method to all of your Commands and Events, in order to get descriptive output with actual values.

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

Sidebar

Related Questions

So, I am willing to structure my project like that: ClassA.cpp: class ClassA {
I have a line of code like this: final Foo foo = (Foo)session.get( Foo.class,
While I'm perfectly willing to believe that this has been asked elsewhere, I haven't
I'm willing to use thumbnails into my website which is mainly like websites directory.
I'm using prawn with prawnto in a rails 3 application to generate some pdf's.
We use iText to generate PDFs from Java (based partly on recommendations on this
I am willing to use Google Analytics to track stats about usage of my
I am willing to develop a mobile application. I wish to have something working
I'm willing to build a restful service using Django, I'm coming form RoR background
I'm willing to write program that after 5 sec shows text that was hidden

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.