Beispiel #1
0
        public async Task <bool> Delete(string url, [FromBody] CancelDomainDto cancel)
        {
            if (string.IsNullOrEmpty(url))
            {
                return(false);
            }

            var result = await _servicesDomain.CancelDomain(url, cancel.XShopperId);

            return(result);
        }
Beispiel #2
0
        public async Task Delete_Domains_Servers_In_Goddady()
        {
            var request = new CancelDomainDto();

            request.Domain     = "edgarleonardo.com";
            request.XShopperId = "";
            var domainInterface = _mocker.GetMock <IServicesDomains>();

            /// Setting the mocking behavior expected
            domainInterface.Setup(p => p.CancelDomain(request.Domain, request.XShopperId)).Returns(Task.FromResult <bool>(true));

            var controller = new DomainsController(domainInterface.Object);
            var result     = await controller.Delete(request.Domain, request);

            Assert.True(result);
        }