Beispiel #1
0
        public void ToApiDeleteNodesRequest()
        {
            // ARRANGE
            ApiDeleteNodesRequest expected = FactoryNode.ApiDeleteNodesRequest;

            DeleteNodesRequest param = new DeleteNodesRequest(expected.NodeIds);

            // ACT
            ApiDeleteNodesRequest actual = NodeMapper.ToApiDeleteNodesRequest(param);

            // ASSERT
            Assert.Equal(expected, actual, new ApiDeleteNodesRequestComparer());
        }
Beispiel #2
0
        public void DeleteNodes(DeleteNodesRequest request)
        {
            _client.Executor.CheckApiServerVersion();

            #region Parameter Validation

            request.MustNotNull(nameof(request));
            request.Ids.EnumerableMustNotNullOrEmpty(nameof(request.Ids));
            request.Ids.ForEach(id => id.MustPositive(nameof(request.Ids) + " element"));

            #endregion

            ApiDeleteNodesRequest apiDeleteNodesRequest = NodeMapper.ToApiDeleteNodesRequest(request);
            IRestRequest          restRequest           = _client.Builder.DeleteNodes(apiDeleteNodesRequest);
            _client.Executor.DoSyncApiCall <VoidResponse>(restRequest, RequestType.DeleteNodes);
        }