Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public PolicyAnalyzer(IPolicyQuote feed)
 {
     policyQuote = feed;
 }