My dynamic behavior behaves as a fake parody, which means that it executes the actual code when called In this way I have tried to do this
var mockProposal = _mockRepository.DynamicMock & lt; BidProposal & gt; (); SetupResult.For (mockProposal.CreateMarketingPlan (empty, empty, blank)). IgnoreArguments (). Repeat. Once (). Return (copyPlan); //Expect.Call (mockProposal.CreateMarketingPlan (empty, empty, zero)) IgnoreGerm (). Repeat. Once (). Return (// copyPlan); // MockProposal Expect (x => x. Credit marketing plan (empty, empty, empty)). Undeclared (). Return (copy). Repetition Once ();
Instead of just hoping to run the code in the form of CreateMarketingPlan
NullReferenceException: The object reference is not set to an instance of an object in the policy. Antiques MarketingPlan .Set MarketingPrintName (Marketing Details Details) MarketingPailas: Line 76 on 76. Antiquity. Marketing Plan. Settlement Plan Description (Marketing Paylan Descriptration Value) Marketing in Pailasi: Line 91. Antiquities on the Policy. MarketingPrane.Creative (PPobanifesPobanifes, MarketingPlanDescription marketingPlanDescription, MarketingPlanType marketingPlanType) In MarketingPlan.cs: Line Test Policy.Policy.Services (PPOBenefits, MarketingPlanDescription marketingPlanDescription, MarketingPlanType marketingPlanType) at BidProposal.cs: Line 23 at Policy.Entities.BidProposal.CreateMarketingPlan. MarketingPlanCopyServiceTests.can_copy_MarketingPlan_with_all_options at 449 () In MarketingPlanCopyServiceTests.cs: line 32
Update: I found out what it was. The method was not "virtual" so it could not be compromised because non-virtual methods can not be proxied.
Why would you have a duplicate to implement your code ?? This is a fake point you make your actual code so that you can concentrate on testing 1 and only 1 functionality.
Update :
Maybe I misunderstood if you are saying that it is behaving unknowingly in this way, then perhaps it is possible for any interface Replacement may be due to using the concrete square.
Replace for example
var mockProposal = _mockRepository.DynamicMock & lt; BidProposal & gt; ();
with
var mockProposal = _mockRepository.DynamicMock & lt; IBidProposal & gt; ();
Comments
Post a Comment