Browse by Tags
All Tags »
Telerik (
RSS)
In my previous post, i showed how JustMock picks mock expectations based on current context without the instance being injected. Based on feedback we found that It’s sometimes confusing and often does not work as intended. However, the context of this...
In this post , I will show how you can mock members from MsCorlib. This is more of an introductory post and shows what you need to do in order to successfully mock an MsCorlib member. If you are planning to mock File or DateTime then the process...
While unit testing a target type, it is likely that the test is failing during object creation because we forgot to include a mandatory configuration file or a line in the constructor is throwing exception because it is making call to some external service...
Previously, i made a post showing how you can leverage the dependent interfaces that is implemented by JustMock during the creation of mock instance. It could be a informative post that let you understand how JustMock behaves internally for classes...
In this post , i show how you can benefit from sequential mocking feature[In JustMock] for setting up expectations with successive calls of same type. To start let’s first consider the following dummy database and entity class. public class Person { public...
In this post, i will be showing how you can mock property sets with your expected values or even action using JustMock. To begin, we have a sample interface: public interface IFoo { int Value { get ; set ; } } Now, we can create a mock that will...
In this post , I will cover a test code that will mock the various elements needed to complete a HTTP page request and assert the expected page cycle steps. To begin, i have a simple enumeration that has my predefined page steps: public enum PageStep...
Today , I will cover a very simple topic, which can be useful in cases we want to mock different interfaces on our expected mock object. Our target interface is simple and it looks like: public interface IFoo : IDisposable { void Do(); } Our target...
In this post, i will be digging in a bit deep on Mock.Assert . This is the continuation from previous post and covers up the ways you can use assert for your mock expectations. I have used another traditional sample of Talisker that has a warehouse [Collaborator...
In this post, i will start with a more traditional mocking example that includes a fund transfer scenario between two different currency account using JustMock.Our target interface that we will be mocking looks similar to: public interface...
More Posts
Next page »