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);
        }
Example #4
0
 /// <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;
 }
Example #6
0
 public void GivenIHaveElectronicReaderWithOnlyOneBook(string title)
 {
     this.reader = new ElectronicReader(new List <BookInfo> {
         TestHelper.GetValidBookInfoWithTitle(title)
     });
 }
Example #7
0
 public void GivenIHaveElectronicReader()
 {
     //// Use Feature-level context extension to retrieve ElectronicReaderService
     //// and invoke method on it:
     this.reader = FeatureContext.Current.GetElectronicReaderService().GetReader();
 }
Example #8
0
 public void ResetElectronicReaderService()
 {
     this.reader = null;
 }
Example #9
0
        public void SetupElectronicReaderStep1()
        {
            Assert.IsNotNull(readerService, "The reader service has not been instantiated with BeforeFeature hook");

            this.reader = readerService.GetReader();
        }
Example #10
0
 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;
 }