Пример #1
0
        public void WhenIPressCreateThisComputer(NewComputer newComputer)
        {
            request.AddParameter("name", newComputer.ComputerName);
            request.AddHeader("Content-Type", "application/x-www-form-urlencoded");

            BaseContext.response = client.Execute(request);
        }
Пример #2
0
 public AddNewComputerSteps(BaseContext baseContext)
     : base(baseContext)
 {
     client = new RestClient("http://computer-database.herokuapp.com/");
     request = new RestRequest("computers", Method.POST);
     newComputer = new NewComputer();
 }
        public SearchForComputerSteps(BaseContext baseContext, AddNewComputerSteps addNewComputer)
            : base(baseContext)
        {
            client = new RestClient("http://computer-database.herokuapp.com/");
            request = new RestRequest("computers", Method.GET);
            newComputer = new NewComputer();

            this.addNewComputer = addNewComputer;

            baseContext.uniqueCompName = "Specflow" + DateTime.Now.ToString();
        }