public void TestUsingMock() { //Mockinf IPolicyQuote mockObj = GetMockForPolicyQuote(); var componentUnderTest = new PolicyAnalyzer(mockObj); // Act: int company1Value = componentUnderTest.GetPolicyQuote("Vehicle1"); int company2Value = componentUnderTest.GetPolicyQuote("Vehicle2"); // Assert: Assert.AreEqual(500, company1Value); Assert.AreEqual(300, company2Value); }
public PolicyAnalyzer(IPolicyQuote feed) { policyQuote = feed; }