Questions tagged [presenter-first]

6 questions
5
votes
1 answer

Presenter-First Unittest with Multiple Assertions

I am attempting to utilize the Presenter-First approach to a new project. I find myself with unittest below. Am I utilizing poor unit testing practices by including so many assertions in this test? If yes, is the issue with my approach to the test…
wesanyer
  • 982
  • 1
  • 6
  • 27
5
votes
1 answer

In Presenter First, why is SubscribeSomeEvent method on an interface preferred to plain old events?

I recently found out about Presenter First and read their whitepapers and blogs, etc. In most of the examples I found, the events are not declared directly on the interface but rather as a method for it. For example, public interface IPuzzleView { …
Jiho Han
  • 1,610
  • 1
  • 19
  • 41
4
votes
1 answer

MVP on semi-complicated pages

I'm working on .NET 3.5 form application with slightly complicated behaviour. It's for a book inventory. To give you an idea, a workflow would be: The user enters an ISBN code If the ISBN is valid, check whether it exists, If it's valid and it…
Lennaert
  • 2,455
  • 15
  • 15
4
votes
3 answers

Write Mockito Test for Presenter Class (Presenter First Pattern)

I'm trying to get familiar with TDD and the Presenter First Pattern. Right now I'm stuck writing a test case for my Presenter.class. My goal is to cover the whole Presenter.class including the Action Event but I have no glue how to do it with…
Oliver
  • 978
  • 6
  • 17
2
votes
2 answers

Subscribe/Unsubscribe (add/remove) to event inside Extension Method

I want to create a fluent extension method for subscribing to (and less importantly unsubscribing from) an event. That is an extension with the usage .RespondBy(Method) in place of a += new Eventhandler(Method) I want to do this:…
HodlDwon
  • 1,131
  • 1
  • 13
  • 30
1
vote
1 answer

WPF : Access Application Resources when not referencing Shell from App.xaml

I am beginner in WPF. My App.xaml looks like below app.xaml
CF_Maintainer
  • 973
  • 2
  • 12
  • 30