public void TestDeleteNewsFromAnotherUser() { var anotherGoClient = new GOClient(@"http://localhost:80/", "NotAlberto", "1234"); var anotherUser = new UserClient { Nickname = "NotAlberto", Password = "******" }; anotherGoClient.CreateUser(anotherUser).Wait(); var createResponse = this.goClient.CreateNews(City, Date, newsClient).Result; var newsUri = createResponse.Headers.Location; var guid = newsUri.AbsolutePath.Split('/').Last(); anotherGoClient.DeleteNews(City, Date, guid).Wait(); Assert.IsTrue(this.newsStorage.Exists(City, DateTime.Parse(Date), Guid.Parse(guid)).Result); }
public void TestDeleteNewsFromAnotherUser() { string frontendEndpoint = ConfigurationManager.AppSettings["FrontendTestEndpoint"]; var anotherGoClient = new GOClient(frontendEndpoint, "NotAlberto", "1234"); var anotherUser = new UserClient { Nickname = "NotAlberto", Password = "******" }; anotherGoClient.CreateUser(anotherUser).Wait(); var createResponse = this.goClient.CreateNews(City, Date, newsClient).Result; var newsUri = createResponse.Headers.Location; var guid = newsUri.AbsolutePath.Split('/').Last(); anotherGoClient.DeleteNews(City, Date, guid).Wait(); Assert.IsTrue(this.newsStorage.Exists(City, DateTime.Parse(Date), Guid.Parse(guid)).Result); }