public void ConvertNodeTypeEnumToValue(NodeType value, string expected)
        {
            // ARRANGE

            // ACT
            string actual = EnumConverter.ConvertNodeTypeEnumToValue(value);

            // ASSERT
            Assert.Equal(expected, actual);
        }
Пример #2
0
        public PreviousVersionList GetPreviousVersions(long parentId, NodeType type, string nodeName, long?offset = null, long?limit = null)
        {
            _client.Executor.CheckApiServerVersion();

            #region Parameter Validation

            parentId.MustPositive(nameof(parentId));
            offset.NullableMustNotNegative(nameof(offset));
            limit.NullableMustPositive(nameof(limit));
            nodeName.MustNotNullOrEmptyOrWhitespace(nameof(nodeName));

            #endregion

            IRestRequest restRequest =
                _client.Builder.GetPreviousVersions(parentId, EnumConverter.ConvertNodeTypeEnumToValue(type), nodeName, offset, limit);
            ApiDeletedNodeVersionsList result =
                _client.Executor.DoSyncApiCall <ApiDeletedNodeVersionsList>(restRequest, RequestType.GetPreviousVersions);
            return(NodeMapper.FromApiDeletedNodeVersionsList(result));
        }