예제 #1
0
        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);
        }
예제 #2
0
        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);
        }