fakeftpserver-beans.xml revision bd576ae311a45a994ae6b457fb2e5bb0ffe0d6b5
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Copyright 2008 the original author or authors.
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8  
9       http://www.apache.org/licenses/LICENSE-2.0
10  
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17
18<!-- Spring Framework configuration for FakeFtpServer -->
19<!-- The FakeFtpServerSpringCofigurationTest class has dependencies on
20		several of the bean names and values configured within this file -->
21
22<beans xmlns="http://www.springframework.org/schema/beans"
23       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24       xsi:schemaLocation="http://www.springframework.org/schema/beans 
25       		http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
26
27    <bean id="fakeFtpServer" class="org.mockftpserver.fake.FakeFtpServer">
28        <property name="serverControlPort" value="9981"/>
29        <property name="systemName" value="UNIX"/>
30        <property name="userAccounts">
31            <list>
32                <bean class="org.mockftpserver.fake.UserAccount">
33                    <property name="username" value="joe"/>
34                    <property name="password" value="password"/>
35                    <property name="homeDirectory" value="/"/>
36                </bean>
37            </list>
38        </property>
39
40        <property name="fileSystem">
41            <bean class="org.mockftpserver.fake.filesystem.UnixFakeFileSystem">
42                <property name="createParentDirectoriesAutomatically" value="false"/>
43                <property name="entries">
44                    <list>
45                        <bean class="org.mockftpserver.fake.filesystem.DirectoryEntry">
46                            <property name="path" value="/"/>
47                        </bean>
48                        <bean class="org.mockftpserver.fake.filesystem.FileEntry">
49                            <property name="path" value="/File.txt"/>
50                            <property name="contents" value="abcdefghijklmnopqrstuvwxyz"/>
51                        </bean>
52                    </list>
53                </property>
54            </bean>
55        </property>
56
57    </bean>
58
59</beans>