Booking icon indicating copy to clipboard operation
Booking copied to clipboard

Application Architecture

Open andymaster01 opened this issue 10 years ago • 6 comments

Hi Mark.

I have been reading your blog a lot lately, I see a lot of interesting reasoning in your posts.

I have question about this project, there is any document explaining the overall architecture for this demo?

andymaster01 avatar Apr 08 '14 18:04 andymaster01

Thank you for writing.

This particular code base is one I've used for various presentations, so there's no document covering exactly this code base. However, this code base is an evolution of a simpler sample code base described in my MSDN Magazine article CQRS on Windows Azure.

For a further evolution on the thoughts presented here, see also my Pluralsight course A Functional Architecture with F#.

ploeh avatar Apr 09 '14 06:04 ploeh

Hello Mark:

I am in the process of rebuilding an application from the ground up, and am advocating using AutoFixture, xUnit and AutoFixture Idioms. I remembered that there were good idiom examples in this project, and so I cloned it, opened it in VS 2013 and upgraded a few packages. I was able to work out many things that failed as a par of the upgrades, but I'm not sure how to deal with one test in DateViewModelTests. You have one test: [Fact] public void SutHasDefaultConstructor() { Assert.DoesNotThrow(() => new DateViewModel()); } xUnit no longer has DoesNotThrow as part of its API (https://github.com/xunit/xunit/issues/188). The goal of the test is to verify that the DateViewModel class has a default constructor, but I'm not sure how to do that now. Any help would be much appreciated.

scpeterson avatar Feb 03 '15 14:02 scpeterson

Well, I don't agree with the decision to remove Assert.DoesNotThrow, but I do understand the arguments being made.

You could always do something like this:

[Fact]
public void SutHasDefaultConstructor()
{
    new DateViewModel(); // Assert that it doesn't throw.
}

ploeh avatar Feb 03 '15 17:02 ploeh

Oh, I see, well that's simple enough, but not very descriptive; having Assert.DoesNotThrow, while possibly redundant, made it very clear what you were asserting. Thank you for your help.

scpeterson avatar Feb 03 '15 18:02 scpeterson

Yes, I agree with you, but I don't control xUnit.net.

ploeh avatar Feb 03 '15 19:02 ploeh

FWIW, I've now added a comment to https://github.com/xunit/xunit/issues/188

ploeh avatar Feb 03 '15 19:02 ploeh