Exemplo n.º 1
0
        public async void TestDeleteItemProperty()
        {
            DeleteItemProperty req;
            Request            req2;
            RecombeeBinding    resp;

            // it 'does not fail with existing property'
            req  = new DeleteItemProperty("int_property");
            resp = await client.SendAsync(req);

            try
            {
                await client.SendAsync(req);

                Assert.True(false, "No exception thrown");
            }
            catch (ResponseException ex)
            {
                Assert.Equal(404, (int)ex.StatusCode);
            }
            // it 'fails with invalid property'
            req = new DeleteItemProperty("$$$not_valid$$$");
            try
            {
                await client.SendAsync(req);

                Assert.True(false, "No exception thrown");
            }
            catch (ResponseException ex)
            {
                Assert.Equal(400, (int)ex.StatusCode);
            }
            // it 'fails with non-existing property'
            req = new DeleteItemProperty("not_existing");
            try
            {
                await client.SendAsync(req);

                Assert.True(false, "No exception thrown");
            }
            catch (ResponseException ex)
            {
                Assert.Equal(404, (int)ex.StatusCode);
            }
        }
Exemplo n.º 2
0
 set => SetValue(DeleteItemProperty, value);