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

            this.reader = readerService.GetReader();
        }
예제 #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;
 }