Skip to content
This repository was archived by the owner on Jun 28, 2022. It is now read-only.

Commit 72ba53d

Browse files
Merge pull request #190 from relativitydev/REL-528254-create-new-version-of-test-helpers
REL-528254 | Relativity.API added as a dependency and GetDbContext() …
2 parents 0818ee4 + 9c7c3df commit 72ba53d

6 files changed

Lines changed: 12 additions & 35 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

66
-------------------------
77

8+
## 2021-03-10
9+
10+
- REL-518415 - New version 8.1.1.1 created - Relativity.API added as a dependency, GetDbContext() set to throw NotImplementedException().
11+
12+
-------------------------
13+
814
## 2021-03-09
915

1016
- REL-518415 - New version 8.1.0.1 created (RSAPI removal and refactor)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ TestHelpers v8 release is only compatible with Ninebark (12.0) and above. Any p
66
This is also available as a [nuget package](https://www.nuget.org/packages/RelativityDev.RelativityTestHelpers/).
77

88

9-
# Version 8.0 Updates
9+
# Version 8.1 Updates
1010
With the deprecation of RSAPI, TestHelpers was significantly updated to account for this. These updates, however, did bring about many breaking changes.
1111

1212
**Note: Previous packages of TestHelpers will still be available, but previous major releases will not be updated with RSAPI removal**
@@ -43,6 +43,7 @@ Context | v7 | v8 |
4343
| Group | GroupHelpers.CreateGroup.Create_Group | GroupHelpers.GroupHelper.CreateGroup |
4444
| Group | GroupHelpers.DeleteGroup.Delete_Group | GroupHelpers.GroupHelper.DeleteGroup |
4545
| KeplerHelper | Any Usage | Removed |
46+
| TestHelper | GetDbContent | No longer implemented |
4647
| User | UserHelpers.CreateUser.CreateNewUser | UserHelpers.UserHelper.Create |
4748
| User | UserHelpers.CreateUser.FindChoiceArtifactId | ArtifactHelpers.ChoiceHelper.GetChoiceId |
4849
| User | UserHelpers.CreateUser.FindClientArtifactId | ArtifactHelpers.ClientHelper.GetClientId |

RelativityDev.RelativityTestHelpers.nuspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<tags>relativity-test-helpers relativity test helpers relativity test helpers test helpers integration tests relativity integration tests </tags>
1616
<dependencies>
1717
<group targetFramework=".NETFramework4.6.2">
18+
<dependency id="Relativity.API" version="15.0.0" />
1819
<dependency id="Relativity.DataExchange.Client.SDK" version="1.12.21" />
1920
<dependency id="Relativity.ObjectManager" version="12.0.78.6" />
2021
<dependency id="Newtonsoft.Json" version="12.0.2" />

Source/Relativity.Test.Helpers/Relativity.Test.Helpers.NUnit.Integration/TestHelperRunSettingsIntegrationTests.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,6 @@ public void TearDown()
3030
SuT = null;
3131
}
3232

33-
[Test]
34-
public void GetDBContextTest()
35-
{
36-
// Arrange
37-
IDBContext context;
38-
39-
// Act
40-
context = SuT.GetDBContext(-1);
41-
context.GetConnection(true);
42-
context.ReleaseConnection();
43-
44-
// Assert
45-
Assert.IsTrue(context.Database.Equals(TestConstants.Database.EddsDatabaseName, StringComparison.OrdinalIgnoreCase));
46-
}
47-
4833
[Test]
4934
public void GetLoggerFactoryTest()
5035
{

Source/Relativity.Test.Helpers/Relativity.Test.Helpers/TestHelper.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,7 @@ public static IHelper System()
6060

6161
public IDBContext GetDBContext(int caseID)
6262
{
63-
//You can create a new DBcontext using kCura.Data.RowDataGeteway until Relativity versions lower than 9.6.85.9
64-
//kCura.Data.RowDataGateway.Context context = new kCura.Data.RowDataGateway.Context(SharedTestHelpers.ConfigurationHelper.SQL_SERVER_ADDRESS, string.Format("EDDS{0}", caseID == -1 ? "" : caseID.ToString()), SharedTestHelpers.ConfigurationHelper.SQL_USER_NAME, SharedTestHelpers.ConfigurationHelper.SQL_PASSWORD);
65-
//return new DBContext(context);
66-
67-
//You can create a new DBcontext using DBContextHelper for Relativity versions equal to or greater than 9.6.85.9
68-
DbContext context;
69-
70-
if (_alternateConfig != null)
71-
{
72-
context = new DbContext(this._alternateConfig.SqlServerAddress, $"EDDS{(caseID == -1 ? "" : caseID.ToString())}", this._alternateConfig.SqlUserName, this._alternateConfig.SqlPassword);
73-
}
74-
else
75-
{
76-
context = new DbContext(SharedTestHelpers.ConfigurationHelper.SQL_SERVER_ADDRESS, $"EDDS{(caseID == -1 ? "" : caseID.ToString())}", SharedTestHelpers.ConfigurationHelper.SQL_USER_NAME, SharedTestHelpers.ConfigurationHelper.SQL_PASSWORD);
77-
}
78-
79-
return context;
63+
throw new NotImplementedException("DbContext is not the recommended process to get sql access. Instead build a custom kepler service for any sql needs.");
8064
}
8165

8266
/// <summary>

variables.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"devVersion":"8.1.0.1-DEV-1",
3-
"productionVersion":"8.1.0.1"
2+
"devVersion":"8.1.1.1-DEV-0",
3+
"productionVersion":"8.1.1.1"
44
}

0 commit comments

Comments
 (0)