Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kx.Test/Connection/ConnectionAsyncWriteTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public async Task ConnectionWritesExpectedStringExpressionAndParametersToClientS
}
}

private Mock<Stream> CreateTestStream(List<byte> bytesWritten)
private static Mock<Stream> CreateTestStream(List<byte> bytesWritten)
{
Mock<Stream> testStream = new Mock<Stream>();

Expand All @@ -283,4 +283,4 @@ private Mock<Stream> CreateTestStream(List<byte> bytesWritten)
return testStream;
}
}
}
}
2 changes: 1 addition & 1 deletion kx.Test/Connection/ConnectionSerialisationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ public void ConnectionSerialisesAndDeserialisesTimeSpanArrayInputWithZipEnabled(
}


private T[] CreateTestArray<T>(Func<int, T> elementBuilder, int arraySize)
private static T[] CreateTestArray<T>(Func<int, T> elementBuilder, int arraySize)
{
T[] array = new T[arraySize];

Expand Down
4 changes: 2 additions & 2 deletions kx.Test/Connection/ConnectionSyncWriteTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public void ConnectionWritesExpectedStringExpressionAndThreeObjectParametersToCl
}
}

private Mock<Stream> CreateTestStream(List<byte> bytesWritten)
private static Mock<Stream> CreateTestStream(List<byte> bytesWritten)
{
Mock<Stream> testStream = new Mock<Stream>();

Expand Down Expand Up @@ -221,4 +221,4 @@ private Mock<Stream> CreateTestStream(List<byte> bytesWritten)
return testStream;
}
}
}
}
8 changes: 5 additions & 3 deletions kx.Test/Types/DictTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ namespace kx.Test.Types
[TestFixture]
public class DictTests
{
private static readonly string[] DictKeys = {"Key_1"};
private static readonly object[] DictValues = {"Value_1"};
[Test]
public void DictInitialises()
{
var dict = new c.Dict(new string[] { "Key_1" }, new object[] { "Value_1" });
var dict = new c.Dict(DictKeys, DictValues);

Assert.IsNotNull(dict);
}
Expand All @@ -18,14 +20,14 @@ public void DictInitialises()
public void DictThrowsIfKeysIsNull()
{
Assert.Throws<ArgumentNullException>(() =>
new c.Dict(null, new object[] { "Value_1" }));
new c.Dict(null, DictValues));
}

[Test]
public void DictThrowsIfValuesIsNull()
{
Assert.Throws<ArgumentNullException>(() =>
new c.Dict(new string[] { "Key_1" }, null));
new c.Dict(DictKeys, null));
}
}
}
10 changes: 6 additions & 4 deletions kx.Test/Types/FlipTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ namespace kx.Test.Types
[TestFixture]
public class FlipTests
{
private static readonly string[] FlipKeys = {"Key_1"};
private static readonly object[] FlipValues = { "Value_1" };
[Test]
public void FlipInitialises()
{
var flip = new c.Flip(new c.Dict(new string[] { "Key_1" }, new object[] { "Value_1" }));
var flip = new c.Flip(new c.Dict(FlipKeys, FlipValues));

Assert.IsNotNull(flip);
}
Expand All @@ -23,7 +25,7 @@ public void FlipThrowsIfDictIsNull()
[Test]
public void FlipAtReturnsValueForColumnName()
{
var flip = new c.Flip(new c.Dict(new string[] { "Key_1" }, new object[] { "Value_1" }));
var flip = new c.Flip(new c.Dict(FlipKeys, FlipValues));

object result = flip.at("Key_1");

Expand All @@ -34,15 +36,15 @@ public void FlipAtReturnsValueForColumnName()
[Test]
public void FlipAtThrowsIfColumnNameIfNotFound()
{
var flip = new c.Flip(new c.Dict(new string[] { "Key_1" }, new object[] { "Value_1" }));
var flip = new c.Flip(new c.Dict(FlipKeys, FlipValues));

Assert.Throws<IndexOutOfRangeException>(() => flip.at("Aardvark"));
}

[Test]
public void FlipAtThrowsIfColumnNameIfNull()
{
var flip = new c.Flip(new c.Dict(new string[] { "Key_1" }, new object[] { "Value_1" }));
var flip = new c.Flip(new c.Dict(FlipKeys, FlipValues));

Assert.Throws<IndexOutOfRangeException>(() => flip.at(null));
}
Expand Down
Loading