コード例 #1
0
        public void CreateDirectoryCreatesDirectory()
        {
            // Arrange

            var service = new IOService();
            var path    = GetTestDataPath("IOServiceTestDirectory");

            _directories.Add(path);

            // Act

            service.CreateDirectory(path);

            // Assert

            Assert.IsTrue(Directory.Exists(path));
        }
コード例 #2
0
        public AcknowledgementResponse GetResponse(CreateDirectoryRequest request)
        {
            AuthorizationService authorizationService = new AuthorizationService();

            int code = 200;

            try
            {
                IOService.CreateDirectory(request.Path);
            }
            catch (ArgumentException)
            {
                code = 500;
            }
            catch
            {
                code = 500;
            }

            return(new AcknowledgementResponse
            {
                Code = code
            });
        }