diff options
Diffstat (limited to 'OpenSim/Data/NHibernate/Tests')
24 files changed, 0 insertions, 1928 deletions
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs deleted file mode 100644 index 89c9567..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernateMsSqlAssetTest : BasicAssetTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | |||
44 | [TestFixtureSetUp] | ||
45 | public void Init() | ||
46 | { | ||
47 | SuperInit(); | ||
48 | // If we manage to connect to the database with the user | ||
49 | // and password above it is our test database, and run | ||
50 | // these tests. If anything goes wrong, ignore these | ||
51 | // tests. | ||
52 | try | ||
53 | { | ||
54 | string connect = "MsSql2005Dialect;SqlClientDriver;Data Source=127.0.0.1;Network Library=DBMSSOCN;Initial Catalog=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; | ||
55 | |||
56 | db = new NHibernateAssetData(); | ||
57 | db.Initialise(connect); | ||
58 | database = ((NHibernateAssetData)db).Manager; | ||
59 | } | ||
60 | catch (Exception e) | ||
61 | { | ||
62 | m_log.Error(e.ToString()); | ||
63 | Assert.Ignore(); | ||
64 | } | ||
65 | } | ||
66 | |||
67 | [TestFixtureTearDown] | ||
68 | public void Cleanup() | ||
69 | { | ||
70 | if (db != null) | ||
71 | { | ||
72 | db.Dispose(); | ||
73 | } | ||
74 | if (database != null) | ||
75 | { | ||
76 | database.DropSchema(); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | } | ||
81 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs deleted file mode 100644 index 6d431a7..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernateMsSqlEstateTest : BasicEstateTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | |||
44 | [TestFixtureSetUp] | ||
45 | public void Init() | ||
46 | { | ||
47 | SuperInit(); | ||
48 | // If we manage to connect to the database with the user | ||
49 | // and password above it is our test database, and run | ||
50 | // these tests. If anything goes wrong, ignore these | ||
51 | // tests. | ||
52 | try | ||
53 | { | ||
54 | string connect = "MsSql2005Dialect;SqlClientDriver;Data Source=127.0.0.1;Network Library=DBMSSOCN;Initial Catalog=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; | ||
55 | |||
56 | db = new NHibernateEstateData(); | ||
57 | db.Initialise(connect); | ||
58 | database = ((NHibernateEstateData)db).Manager; | ||
59 | } | ||
60 | catch (Exception e) | ||
61 | { | ||
62 | m_log.Error(e.ToString()); | ||
63 | Assert.Ignore(); | ||
64 | } | ||
65 | } | ||
66 | |||
67 | [TestFixtureTearDown] | ||
68 | public void Cleanup() | ||
69 | { | ||
70 | if (db != null) | ||
71 | { | ||
72 | ((NHibernateEstateData)db).Dispose(); | ||
73 | } | ||
74 | if (database != null) | ||
75 | { | ||
76 | database.DropSchema(); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | } | ||
81 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs deleted file mode 100644 index 30280af..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernateMsSqlGridTest : BasicGridTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateGridData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateGridData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | db.Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs deleted file mode 100644 index 6d60006..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernateMsSqlInventoryTest : BasicInventoryTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateInventoryData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateInventoryData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | db.Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | |||
79 | } | ||
80 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs deleted file mode 100644 index 9a9c41d..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernateMsSqlRegionTest : BasicRegionTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; | ||
44 | |||
45 | |||
46 | [TestFixtureSetUp] | ||
47 | public void Init() | ||
48 | { | ||
49 | SuperInit(); | ||
50 | // If we manage to connect to the database with the user | ||
51 | // and password above it is our test database, and run | ||
52 | // these tests. If anything goes wrong, ignore these | ||
53 | // tests. | ||
54 | try | ||
55 | { | ||
56 | db = new NHibernateRegionData(); | ||
57 | db.Initialise(connect); | ||
58 | database = ((NHibernateRegionData)db).Manager; | ||
59 | } | ||
60 | catch (Exception e) | ||
61 | { | ||
62 | m_log.Error(e.ToString()); | ||
63 | Assert.Ignore(); | ||
64 | } | ||
65 | } | ||
66 | |||
67 | [TestFixtureTearDown] | ||
68 | public void Cleanup() | ||
69 | { | ||
70 | if (db != null) | ||
71 | { | ||
72 | db.Dispose(); | ||
73 | } | ||
74 | if (database != null) | ||
75 | { | ||
76 | database.DropSchema(); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | } | ||
81 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs deleted file mode 100644 index cd861de..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernateMsSqlUserTest : BasicUserTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateUserData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateUserData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | db.Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs deleted file mode 100644 index 7c7b5f7..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernateMySQLAssetTest : BasicAssetTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateAssetData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateAssetData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | db.Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | |||
79 | } | ||
80 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs deleted file mode 100644 index dbb1d14..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernateMySQLGridTest : BasicGridTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateGridData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateGridData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | db.Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs deleted file mode 100644 index 6c31a63..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernateMySQLInventoryTest : BasicInventoryTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateInventoryData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateInventoryData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | db.Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | |||
79 | } | ||
80 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs deleted file mode 100644 index 28660d9..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernateMySQLRegionTest : BasicRegionTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; | ||
44 | |||
45 | |||
46 | [TestFixtureSetUp] | ||
47 | public void Init() | ||
48 | { | ||
49 | SuperInit(); | ||
50 | // If we manage to connect to the database with the user | ||
51 | // and password above it is our test database, and run | ||
52 | // these tests. If anything goes wrong, ignore these | ||
53 | // tests. | ||
54 | try | ||
55 | { | ||
56 | db = new NHibernateRegionData(); | ||
57 | db.Initialise(connect); | ||
58 | database = ((NHibernateRegionData)db).Manager; | ||
59 | } | ||
60 | catch (Exception e) | ||
61 | { | ||
62 | m_log.Error(e.ToString()); | ||
63 | Assert.Ignore(); | ||
64 | } | ||
65 | } | ||
66 | |||
67 | [TestFixtureTearDown] | ||
68 | public void Cleanup() | ||
69 | { | ||
70 | if (db != null) | ||
71 | { | ||
72 | db.Dispose(); | ||
73 | } | ||
74 | if (database != null) | ||
75 | { | ||
76 | database.DropSchema(); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | } | ||
81 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs deleted file mode 100644 index d5caa3e..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernateMySQLUserTest : BasicUserTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateUserData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateUserData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | db.Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs deleted file mode 100644 index 72b4320..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernateMySQLEstateTest : BasicEstateTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateEstateData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateEstateData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | ((NHibernateEstateData)db).Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | |||
79 | } | ||
80 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs deleted file mode 100644 index d1ec3d0..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernatePostgreSQLAssetTest : BasicAssetTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateAssetData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateAssetData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | db.Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | |||
79 | } | ||
80 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs deleted file mode 100644 index fdd99ab..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernatePostgreSQLEstateTest : BasicEstateTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateEstateData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateEstateData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | ((NHibernateEstateData)db).Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | |||
79 | } | ||
80 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs deleted file mode 100644 index fe874cb..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernatePostgreSQLGridTest : BasicGridTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateGridData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateGridData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | db.Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs deleted file mode 100644 index 048d36f..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernatePostgreSQLInventoryTest : BasicInventoryTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateInventoryData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateInventoryData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | db.Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | |||
79 | } | ||
80 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs deleted file mode 100644 index 76b6fea..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernatePostgreSQLRegionTest : BasicRegionTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateRegionData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateRegionData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | db.Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | |||
79 | } | ||
80 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs deleted file mode 100644 index c437cd8..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using NUnit.Framework; | ||
30 | using OpenSim.Data.Tests; | ||
31 | using log4net; | ||
32 | using System.Reflection; | ||
33 | using OpenSim.Tests.Common; | ||
34 | |||
35 | namespace OpenSim.Data.NHibernate.Tests | ||
36 | { | ||
37 | [TestFixture, DatabaseTest] | ||
38 | public class NHibernatePostgreSQLUserTest : BasicUserTest | ||
39 | { | ||
40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | public string file; | ||
42 | public NHibernateManager database; | ||
43 | public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | db = new NHibernateUserData(); | ||
56 | db.Initialise(connect); | ||
57 | database = ((NHibernateUserData)db).Manager; | ||
58 | } | ||
59 | catch (Exception e) | ||
60 | { | ||
61 | m_log.Error(e.ToString()); | ||
62 | Assert.Ignore(); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void Cleanup() | ||
68 | { | ||
69 | if (db != null) | ||
70 | { | ||
71 | db.Dispose(); | ||
72 | } | ||
73 | if (database != null) | ||
74 | { | ||
75 | database.DropSchema(); | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs deleted file mode 100644 index c8d6e75..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.IO; | ||
30 | using NUnit.Framework; | ||
31 | using OpenSim.Data.Tests; | ||
32 | using log4net; | ||
33 | using System.Reflection; | ||
34 | using OpenSim.Tests.Common; | ||
35 | |||
36 | namespace OpenSim.Data.NHibernate.Tests | ||
37 | { | ||
38 | [TestFixture, DatabaseTest] | ||
39 | public class NHibernateSQLiteAssetTest : BasicAssetTest | ||
40 | { | ||
41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | public string file; | ||
43 | public NHibernateManager database; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3"; | ||
56 | |||
57 | db = new NHibernateAssetData(); | ||
58 | db.Initialise(connect); | ||
59 | database = ((NHibernateAssetData)db).Manager; | ||
60 | } | ||
61 | catch (Exception e) | ||
62 | { | ||
63 | m_log.Error(e.ToString()); | ||
64 | Assert.Ignore(); | ||
65 | } | ||
66 | } | ||
67 | |||
68 | [TestFixtureTearDown] | ||
69 | public void Cleanup() | ||
70 | { | ||
71 | if (db != null) | ||
72 | { | ||
73 | db.Dispose(); | ||
74 | } | ||
75 | if (database != null) | ||
76 | { | ||
77 | database.DropSchema(); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | } | ||
82 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs deleted file mode 100644 index 345db84..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.IO; | ||
30 | using NUnit.Framework; | ||
31 | using OpenSim.Data.Tests; | ||
32 | using log4net; | ||
33 | using System.Reflection; | ||
34 | using OpenSim.Tests.Common; | ||
35 | |||
36 | namespace OpenSim.Data.NHibernate.Tests | ||
37 | { | ||
38 | [TestFixture, DatabaseTest] | ||
39 | public class NHibernateSQLiteEstateTest : BasicEstateTest | ||
40 | { | ||
41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | public string file; | ||
43 | public NHibernateManager database; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3"; | ||
56 | |||
57 | db = new NHibernateEstateData(); | ||
58 | db.Initialise(connect); | ||
59 | database = ((NHibernateEstateData)db).Manager; | ||
60 | } | ||
61 | catch (Exception e) | ||
62 | { | ||
63 | m_log.Error(e.ToString()); | ||
64 | Assert.Ignore(); | ||
65 | } | ||
66 | } | ||
67 | |||
68 | [TestFixtureTearDown] | ||
69 | public void Cleanup() | ||
70 | { | ||
71 | if (db != null) | ||
72 | { | ||
73 | ((NHibernateEstateData)db).Dispose(); | ||
74 | } | ||
75 | if (database != null) | ||
76 | { | ||
77 | database.DropSchema(); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | } | ||
82 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs deleted file mode 100644 index 24a19c9..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.IO; | ||
30 | using NUnit.Framework; | ||
31 | using OpenSim.Data.Tests; | ||
32 | using log4net; | ||
33 | using System.Reflection; | ||
34 | using OpenSim.Tests.Common; | ||
35 | |||
36 | namespace OpenSim.Data.NHibernate.Tests | ||
37 | { | ||
38 | [TestFixture, DatabaseTest] | ||
39 | public class NHibernateSQLiteGridTest : BasicGridTest | ||
40 | { | ||
41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | public string file; | ||
43 | public NHibernateManager database; | ||
44 | public string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3"; | ||
45 | |||
46 | [TestFixtureSetUp] | ||
47 | public void Init() | ||
48 | { | ||
49 | SuperInit(); | ||
50 | // If we manage to connect to the database with the user | ||
51 | // and password above it is our test database, and run | ||
52 | // these tests. If anything goes wrong, ignore these | ||
53 | // tests. | ||
54 | try | ||
55 | { | ||
56 | db = new NHibernateGridData(); | ||
57 | db.Initialise(connect); | ||
58 | database = ((NHibernateGridData)db).Manager; | ||
59 | } | ||
60 | catch (Exception e) | ||
61 | { | ||
62 | m_log.Error(e.ToString()); | ||
63 | Assert.Ignore(); | ||
64 | } | ||
65 | } | ||
66 | |||
67 | [TestFixtureTearDown] | ||
68 | public void Cleanup() | ||
69 | { | ||
70 | if (db != null) | ||
71 | { | ||
72 | db.Dispose(); | ||
73 | } | ||
74 | if (database != null) | ||
75 | { | ||
76 | database.DropSchema(); | ||
77 | } | ||
78 | } | ||
79 | } | ||
80 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs deleted file mode 100644 index ec15c55..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.IO; | ||
30 | using NUnit.Framework; | ||
31 | using OpenSim.Data.Tests; | ||
32 | using log4net; | ||
33 | using System.Reflection; | ||
34 | using OpenSim.Tests.Common; | ||
35 | |||
36 | namespace OpenSim.Data.NHibernate.Tests | ||
37 | { | ||
38 | [TestFixture, DatabaseTest] | ||
39 | public class NHibernateSQLiteInventoryTest : BasicInventoryTest | ||
40 | { | ||
41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | public string file; | ||
43 | public NHibernateManager database; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3"; | ||
56 | |||
57 | db = new NHibernateInventoryData(); | ||
58 | db.Initialise(connect); | ||
59 | database = ((NHibernateInventoryData)db).Manager; | ||
60 | } | ||
61 | catch (Exception e) | ||
62 | { | ||
63 | m_log.Error(e.ToString()); | ||
64 | Assert.Ignore(); | ||
65 | } | ||
66 | } | ||
67 | |||
68 | [TestFixtureTearDown] | ||
69 | public void Cleanup() | ||
70 | { | ||
71 | if (db != null) | ||
72 | { | ||
73 | db.Dispose(); | ||
74 | } | ||
75 | if (database != null) | ||
76 | { | ||
77 | database.DropSchema(); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | } | ||
82 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs deleted file mode 100644 index 692ba5a..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.IO; | ||
30 | using NUnit.Framework; | ||
31 | using OpenSim.Data.Tests; | ||
32 | using log4net; | ||
33 | using System.Reflection; | ||
34 | using OpenSim.Tests.Common; | ||
35 | |||
36 | namespace OpenSim.Data.NHibernate.Tests | ||
37 | { | ||
38 | [TestFixture, DatabaseTest] | ||
39 | public class NHibernateSQLiteRegionTest : BasicRegionTest | ||
40 | { | ||
41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | public string file; | ||
43 | public NHibernateManager database; | ||
44 | |||
45 | [TestFixtureSetUp] | ||
46 | public void Init() | ||
47 | { | ||
48 | SuperInit(); | ||
49 | // If we manage to connect to the database with the user | ||
50 | // and password above it is our test database, and run | ||
51 | // these tests. If anything goes wrong, ignore these | ||
52 | // tests. | ||
53 | try | ||
54 | { | ||
55 | string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3"; | ||
56 | |||
57 | db = new NHibernateRegionData(); | ||
58 | db.Initialise(connect); | ||
59 | database = ((NHibernateRegionData)db).Manager; | ||
60 | } | ||
61 | catch (Exception e) | ||
62 | { | ||
63 | m_log.Error(e.ToString()); | ||
64 | Assert.Ignore(); | ||
65 | } | ||
66 | } | ||
67 | |||
68 | [TestFixtureTearDown] | ||
69 | public void Cleanup() | ||
70 | { | ||
71 | if (db != null) | ||
72 | { | ||
73 | db.Dispose(); | ||
74 | } | ||
75 | if (database != null) | ||
76 | { | ||
77 | database.DropSchema(); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | } | ||
82 | } | ||
diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs deleted file mode 100644 index 32a5bbe..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.IO; | ||
30 | using NUnit.Framework; | ||
31 | using OpenSim.Data.Tests; | ||
32 | using log4net; | ||
33 | using System.Reflection; | ||
34 | using OpenSim.Tests.Common; | ||
35 | |||
36 | namespace OpenSim.Data.NHibernate.Tests | ||
37 | { | ||
38 | |||
39 | [TestFixture, DatabaseTest] | ||
40 | public class NHibernateSQLiteUserTest : BasicUserTest | ||
41 | { | ||
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | public string file; | ||
44 | public NHibernateManager database; | ||
45 | |||
46 | [TestFixtureSetUp] | ||
47 | public void Init() | ||
48 | { | ||
49 | SuperInit(); | ||
50 | // If we manage to connect to the database with the user | ||
51 | // and password above it is our test database, and run | ||
52 | // these tests. If anything goes wrong, ignore these | ||
53 | // tests. | ||
54 | try | ||
55 | { | ||
56 | string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3"; | ||
57 | |||
58 | db = new NHibernateUserData(); | ||
59 | db.Initialise(connect); | ||
60 | database = ((NHibernateUserData)db).Manager; | ||
61 | } | ||
62 | catch (Exception e) | ||
63 | { | ||
64 | m_log.Error(e.ToString()); | ||
65 | Assert.Ignore(); | ||
66 | } | ||
67 | } | ||
68 | |||
69 | [TestFixtureTearDown] | ||
70 | public void Cleanup() | ||
71 | { | ||
72 | if (db != null) | ||
73 | { | ||
74 | db.Dispose(); | ||
75 | } | ||
76 | if (database != null) | ||
77 | { | ||
78 | database.DropSchema(); | ||
79 | } | ||
80 | } | ||
81 | } | ||
82 | } | ||