public void WriteReview(IWebDriver driver, string FullName, string EmailAccount, string ReviewText) { YourName.SendKeys(FullName); YourEmail.SendKeys(EmailAccount); ReviewComments.SendKeys(ReviewText); SubmitReviewButton.Click(); Thread.Sleep(5000); }
public DoctorViewModel() { doctor = new Doctor(); Addresses = new List <Address>(); Specialitys = new List <Speciality>(); Schedule = new List <Schedule>(); listReviewComments = new List <DoctorUserReviewComments>(); ReviewComments = new ReviewComments(); }
public ActionResult DeleteConfirmed(int id) { ReviewComments reviewComment = _reviewCommentsService.GetReviewCommentById(id); if (reviewComment != null) { if (_reviewCommentsService.DeleteReviewComment(reviewComment)) { return(Content("Deleted")); } } return(Content("Error")); }
static void Main() { var shards = new Dictionary<string, IDocumentStore> { { "Asia", new DocumentStore { Url = "http://localhost:8083"} }, { "Middle East", new DocumentStore { Url = "http://localhost:8081"} }, { "America", new DocumentStore { Url = "http://localhost:8082"} }, }; var shardStrategy = new ShardStrategy(shards) .ShardingOn<User>(user => user.Region) .ShardingOn<Review>(review => review.UserId) .ShardingOn<ReviewComments>(reviewComments => reviewComments.Review.Id); var documentStore = new ShardedDocumentStore(shardStrategy) .Initialize(); var reviewId = string.Empty; using (var session = documentStore.OpenSession()) { var batman = new User { UserName = "******", Region = "Asia" }; var superman = new User { UserName = "******", Region = "Middle East" }; var ironman = new User { UserName = "******", Region = "America" }; session.Store(batman); session.Store(superman); session.Store(ironman); var badReview = new Review { UserId = batman.Id }; var normalReview = new Review { UserId = superman.Id }; var superReview = new Review { UserId = ironman.Id }; session.Store(badReview); session.Store(normalReview); session.Store(superReview); var reviewComments = new ReviewComments(); reviewComments.Comments.Add(new Comment { Message = "First comments" }); reviewComments.Comments.Add(new Comment { Message = "Second comments" }); reviewComments.Comments.Add(new Comment { Message = "Third comments" }); reviewComments.Review.Id = superReview.Id; session.Store(reviewComments); superReview.CommentsId = reviewComments.Id; session.SaveChanges(); reviewId = superReview.Id; } using (var session = documentStore.OpenSession()) { var reviewOne = session.Include<Review, User>(x => x.UserId) .Load(reviewId); var user = session.Load<User>(reviewOne.UserId); //var reviewTwo = session.Include<Review, ReviewComments>(x => x.CommentsId) // .Load(reviewId); //var reviewComments = session.Load<ReviewComments>(reviewTwo.CommentsId); } }