21 Mar 14:49
[jmock-dev] Naming of expects method
From: Martin Kersten <Martin.Kersten@...>
Subject: [jmock-dev] Naming of expects method
Newsgroups: gmane.comp.java.jmock.devel
Date: 2005-03-21 13:49:10 GMT
Subject: [jmock-dev] Naming of expects method
Newsgroups: gmane.comp.java.jmock.devel
Date: 2005-03-21 13:49:10 GMT
Hi there, I was constantly wondering why the Mock.expects method is called expects method. You know the only guess I have is this: mock.expects(..) means "the mock expects (...)" but I would go for: mock.expect(...) meaning "mock you should expect..." Another thing that I noticed is, I only use mock.expects(once) or mock.stub(..). I guess it would be nice if a expects() method would be available, which means exactly the same as expects(once()). -> expects() <--> expects(once()) I tried this and it improved the readability. Thanks, Martin (Kersten)
RSS Feed