public void RequestNonExistingItem() { StubMockStyleDictionary testee = new StubMockStyleDictionary(); Mock <IMockObject> mock = mockFactory.CreateMock <IMockObject>(); Assert.IsNull(testee[mock.MockObject, typeof(IHelloWorld)]); }
public void MockStyleForStubAndType() { StubMockStyleDictionary testee = new StubMockStyleDictionary(); Mock <IMockObject> mock = mockFactory.CreateMock <IMockObject>(); testee[mock.MockObject, typeof(IHelloWorld)] = MockStyle.Stub; Assert.AreEqual(MockStyle.Stub, testee[mock.MockObject, typeof(IHelloWorld)]); }
public void Override() { StubMockStyleDictionary testee = new StubMockStyleDictionary(); Mock <IMockObject> mock = mockFactory.CreateMock <IMockObject>(); testee[mock.MockObject] = MockStyle.Transparent; testee[mock.MockObject, typeof(IHelloWorld)] = MockStyle.Stub; testee[mock.MockObject, typeof(IHelloWorld)] = null; Assert.AreEqual(MockStyle.Transparent, testee[mock.MockObject, typeof(IHelloWorld)]); testee[mock.MockObject] = null; Assert.IsNull(testee[mock.MockObject]); Assert.IsNull(testee[mock.MockObject, typeof(IHelloWorld)]); }