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

Commit abf53ef

Browse files
authored
Merge pull request #240 from agametov/master
fix 'if' statements with identical conditional expressions
2 parents bfbd58b + 46a5259 commit abf53ef

29 files changed

+92
-92
lines changed

src/ServiceStack.Redis/Generic/RedisTypedClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public IRedisSet TypeIdsSet
166166
public T this[string key]
167167
{
168168
get { return GetValue(key); }
169-
set { SetEntry(key, value); }
169+
set { SetValue(key, value); }
170170
}
171171

172172
public byte[] SerializeValue(T value)

src/ServiceStack.Redis/RedisClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void Init()
9696
public string this[string key]
9797
{
9898
get { return GetValue(key); }
99-
set { SetEntry(key, value); }
99+
set { SetValue(key, value); }
100100
}
101101

102102
public override void OnConnected() { }
@@ -675,7 +675,7 @@ public T Store<T>(T entity)
675675
var urnKey = UrnKey(entity);
676676
var valueString = JsonSerializer.SerializeToString(entity);
677677

678-
this.SetEntry(urnKey, valueString);
678+
this.SetValue(urnKey, valueString);
679679
RegisterTypeId(entity);
680680

681681
return entity;
@@ -690,7 +690,7 @@ public object StoreObject(object entity)
690690
var urnKey = UrnKey(entityType, id);
691691
var valueString = JsonSerializer.SerializeToString(entity);
692692

693-
this.SetEntry(urnKey, valueString);
693+
this.SetValue(urnKey, valueString);
694694

695695
RegisterTypeId(GetTypeIdsSetKey(entityType), id.ToString());
696696

src/ServiceStack.Redis/RedisNativeClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2182,7 +2182,7 @@ public long GeoAdd(string key, double longitude, double latitude, string member)
21822182
{
21832183
if (key == null)
21842184
throw new ArgumentNullException("key");
2185-
if (key == null)
2185+
if (member == null)
21862186
throw new ArgumentNullException("member");
21872187

21882188
return SendExpectLong(Commands.GeoAdd, key.ToUtf8Bytes(), longitude.ToUtf8Bytes(), latitude.ToUtf8Bytes(), member.ToUtf8Bytes());

tests/ServiceStack.Redis.Tests.Sentinel/Redis3SentinelSetupTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ public void Can_connect_to_GoogleCloud_3SentinelSetup()
5858

5959
client.FlushAll();
6060

61-
client.SetEntry("Sentinel3Setup", "GoogleCloud");
61+
client.SetValue("Sentinel3Setup", "GoogleCloud");
6262

63-
var result = client.GetEntry("Sentinel3Setup");
63+
var result = client.GetValue("Sentinel3Setup");
6464
Assert.That(result, Is.EqualTo("GoogleCloud"));
6565
}
6666

6767
using (var readOnly = redisManager.GetReadOnlyClient())
6868
{
6969
"{0}:{1}".Print(readOnly.Host, readOnly.Port);
7070

71-
var result = readOnly.GetEntry("Sentinel3Setup");
71+
var result = readOnly.GetValue("Sentinel3Setup");
7272
Assert.That(result, Is.EqualTo("GoogleCloud"));
7373
}
7474
}

tests/ServiceStack.Redis.Tests.Sentinel/RedisResolverTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ namespace ServiceStack.Redis.Tests.Sentinel
99
public class RedisResolverTests
1010
: RedisSentinelTestBase
1111
{
12-
[TestFixtureSetUp]
13-
public void TestFixtureSetUp()
12+
[OneTimeSetUp]
13+
public void OneTimeSetUp()
1414
{
1515
StartAllRedisServers();
1616
}
1717

18-
[TestFixtureTearDown]
19-
public void TestFixtureTearDown()
18+
[OneTimeTearDown]
19+
public void OneTimeTearDown()
2020
{
2121
ShutdownAllRedisServers();
2222
}

tests/ServiceStack.Redis.Tests.Sentinel/RedisSentinelTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ namespace ServiceStack.Redis.Tests.Sentinel
1010
public class RedisSentinelTests
1111
: RedisSentinelTestBase
1212
{
13-
[TestFixtureSetUp]
13+
[OneTimeSetUp]
1414
public void OnBeforeTestFixture()
1515
{
1616
StartAllRedisServers();
1717
StartAllRedisSentinels();
1818
LogManager.LogFactory = new ConsoleLogFactory(debugEnabled:true);
1919
}
2020

21-
[TestFixtureTearDown]
21+
[OneTimeTearDown]
2222
public void OnAfterTestFixture()
2323
{
2424
ShutdownAllRedisSentinels();

tests/ServiceStack.Redis.Tests/ConfigTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ namespace ServiceStack.Redis.Tests
55
[TestFixture]
66
public class ConfigTests
77
{
8-
[TestFixtureSetUp]
9-
public void TestFixtureSetUp()
8+
[OneTimeSetUp]
9+
public void OneTimeSetUp()
1010
{
1111
RedisConfig.VerifyMasterConnections = false;
1212
}
1313

14-
[TestFixtureTearDown]
15-
public void TestFixtureTearDown()
14+
[OneTimeTearDown]
15+
public void OneTimeTearDown()
1616
{
1717
RedisConfig.VerifyMasterConnections = true;
1818
}

tests/ServiceStack.Redis.Tests/CultureInfoTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public class CultureInfoTests
1010
{
1111
private CultureInfo previousCulture = CultureInfo.InvariantCulture;
1212

13-
[TestFixtureSetUp]
14-
public void TestFixtureSetUp()
13+
[OneTimeSetUp]
14+
public void OneTimeSetUp()
1515
{
1616
#if NETCORE
1717
previousCulture = CultureInfo.CurrentCulture;
@@ -23,8 +23,8 @@ public void TestFixtureSetUp()
2323
#endif
2424
}
2525

26-
[TestFixtureTearDown]
27-
public void TestFixtureTearDown()
26+
[OneTimeTearDown]
27+
public void OneTimeTearDown()
2828
{
2929
#if NETCORE
3030
CultureInfo.CurrentCulture = previousCulture;

tests/ServiceStack.Redis.Tests/Examples/SimplePubSub.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public class SimplePubSub
1313
const string MessagePrefix = "MESSAGE ";
1414
const int PublishMessageCount = 5;
1515

16-
[TestFixtureSetUp]
17-
public void TestFixtureSetUp()
16+
[OneTimeSetUp]
17+
public void OneTimeSetUp()
1818
{
1919
using (var redis = new RedisClient(TestConfig.SingleHost))
2020
{

tests/ServiceStack.Redis.Tests/Generic/RedisClientTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace ServiceStack.Redis.Tests.Generic
88
[TestFixture, Category("Integration")]
99
public class RedisClientTests : RedisClientTestsBase
1010
{
11-
[TestFixtureSetUp]
11+
[OneTimeSetUp]
1212
public void TestFixture()
1313
{
1414
}

0 commit comments

Comments
 (0)