🃏
Bard
  • Introduction
  • Getting Started
    • Installation
    • Writing Your First Test
    • Configuration
    • .NET Fiddles
  • Anatomy Of A Scenario
    • Given
      • StoryData
      • StoryBook
      • Chapter
      • Story
    • When
    • Then
      • HTTP Response
      • Headers
      • Bad Requests
      • Performance Testing
  • Advanced
    • Dependency Injection
  • Miscellaneous
    • Change Log
    • Migration Guide
  • gRPC
    • Installation
    • Configuration
    • Writing A Test
  • Tips & Tricks
    • FAQ
Powered by GitBook
On this page
  • Version 2 to 3
  • does not contain a definition for 'Then'
  • does not contain a definition for 'That'
  • Version 1 to 2
  • [CS0246] The type or namespace name 'IScenarioContext' could not be found
  • The type arguments for method 'IChapterGiven<..... cannot be inferred
  • Cannot resolve UseResult

Was this helpful?

Export as PDF
  1. Miscellaneous

Migration Guide

Version 2 to 3

does not contain a definition for 'Then'

// BEFORE
.Then<TransferInstructionCreatedChapter>();

// NEW
.ProceedToChapter<TransferInstructionCreatedChapter>();

does not contain a definition for 'That'

// BEFORE
Scenario.Given.That
    .An_investor_has_been_created();

// AFTER
Scenario.Given
    .An_investor_has_been_created();

Version 1 to 2

[CS0246] The type or namespace name 'IScenarioContext' could not be found

Replace all references of IScenarioContext with ScenarioContext

The type arguments for method 'IChapterGiven<..... cannot be inferred

Example this code:

public static readonly Func<ScenarioContext, StoryInput, StoryParameters, StoryOuput> AccountTransactionCreated =
    (context, input, parameters) =>
    {        
        StoryOutput output = // Do Some work here
        return ouput;
    };

Should change to:

public static readonly Func<ScenarioContext<StoryInput>, StoryParameters, StoryOuput> AccountTransactionCreated =
    (context, parameters) =>
    {       
        // Story Input is now accessed through the Scenario Context
        var storyInput = context.StoryInput; 
        // Do work here
        StoryOutput output = // Do Some work here
        return ouput;
    };

Cannot resolve UseResult

 .UseResult(clientRegistered => newClient = clientRegistered );

refactored to:

.GetResult(out NewClientRegistered? newClient);
PreviousChange LogNextInstallation

Last updated 4 years ago

Was this helpful?