public void RegisterDependenciesWithBooksListAsInstance() { var reader = new ElectronicReader(); objectContainer.RegisterInstanceAs(reader); objectContainer.RegisterInstanceAs <IList <BookInfo> >(reader.RetrieveListOfBooks().ToList()); }
public void RegisterDependenciesWithBookListAsType() { var reader = new ElectronicReader(); objectContainer.RegisterInstanceAs(reader); objectContainer.RegisterTypeAs <List <BookInfo>, IList <BookInfo> >(); }
public void GivenIHaveElectronicReaderWithBook(string title) { this.reader = new ElectronicReader(); var book = TestHelper.GetValidBookInfoWithTitle(title); this.reader.AddTheBookToTheReaderStorage(book); }
/// <summary> /// Initializes a new instance of the <see cref="BindingScopeRestrictionsDemoSteps"/> class. /// </summary> public BindingScopeRestrictionsDemoSteps() { this.reader = new ElectronicReader(); }
/// <summary> /// Initializes a new instance of the <see cref="DataContextManagementOpenBookSteps"/> class. /// !!! Pay attention: Constructor injection for ElectronicReader /// </summary> /// <param name="reader">The reader.</param> public DataContextManagementOpenBookSteps(ElectronicReader reader) { this.reader = reader; }
public void GivenIHaveElectronicReaderWithOnlyOneBook(string title) { this.reader = new ElectronicReader(new List <BookInfo> { TestHelper.GetValidBookInfoWithTitle(title) }); }
public void GivenIHaveElectronicReader() { //// Use Feature-level context extension to retrieve ElectronicReaderService //// and invoke method on it: this.reader = FeatureContext.Current.GetElectronicReaderService().GetReader(); }
public void ResetElectronicReaderService() { this.reader = null; }
public void SetupElectronicReaderStep1() { Assert.IsNotNull(readerService, "The reader service has not been instantiated with BeforeFeature hook"); this.reader = readerService.GetReader(); }
public void GivenIHaveElectronicReader() { this.reader = new ElectronicReader(); }
/// <summary> /// Initializes a new instance of the <see cref="DataContextManagementCommonSteps"/> class. /// !!! Pay attention: Constructor injection for ElectronicReader /// </summary> /// <param name="reader">The reader.</param> public DataContextManagementCommonSteps(ElectronicReader reader) { this.reader = reader; }