public void GetDocument_ReturnsNotNull() { IArmoryProtocol protocol = m_mock.DynamicMock<IArmoryProtocol>(); ArmoryDocumentProvider provider = new ArmoryDocumentProvider(protocol); Expect.Call(protocol.GetResponse("NotFound")).Return(m_notFoundStream); m_mock.Replay(protocol); XmlDocument document = provider.GetDocument("NotFound"); Assert.IsTrue(document != null); }
public void GetDocument_ShouldCall_Protocol_GetStream() { IArmoryProtocol protocol = m_mock.DynamicMock<IArmoryProtocol>(); ArmoryDocumentProvider provider = new ArmoryDocumentProvider(protocol); Expect.Call(protocol.GetResponse(m_validUri)).Return(m_validCharacterSheetStream); m_mock.Replay(protocol); provider.GetDocument(m_validUri); m_mock.Verify(protocol); }