Skip to content

Commit a9fd39e

Browse files
committed
cleanup and bump some packages
1 parent d3e6f53 commit a9fd39e

16 files changed

+629
-81
lines changed

Flexinets.Ldap.Core.Tests/BerLengthTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void TestBerLengthLongNotation6()
3434
[TestCase("8400000159", 345)]
3535
[TestCase("840000014f", 335)]
3636
[TestCase("840000012b", 299)]
37-
public void TestBerToInt(String input, Int32 expected)
37+
public void TestBerToInt(string input, int expected)
3838
{
3939
var position = 0;
4040
var intlength = Utils.BerLengthToInt(Utils.StringToByteArray(input), 0, out position);
@@ -49,7 +49,7 @@ public void TestBerToInt(String input, Int32 expected)
4949
[TestCase(345, "8400000159")]
5050
[TestCase(335, "840000014f")]
5151
[TestCase(299, "840000012b")]
52-
public void TestIntToBer(Int32 input, String expected)
52+
public void TestIntToBer(int input, string expected)
5353
{
5454
var intlength = Utils.ByteArrayToString(Utils.IntToBerLength(input));
5555

Flexinets.Ldap.Core.Tests/Flexinets.Ldap.Core.Tests.csproj

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.0</TargetFramework>
5-
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<LangVersion>latest</LangVersion>
6+
<WarningsAsErrors>true</WarningsAsErrors>
67
<IsPackable>false</IsPackable>
8+
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
9+
<RestoreLockedMode>true</RestoreLockedMode>
710
</PropertyGroup>
811

912
<ItemGroup>
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
11-
<PackageReference Include="NUnit" Version="3.11.0" />
12-
<PackageReference Include="NUnit.ConsoleRunner" Version="3.9.0" />
13-
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
14+
<PackageReference Include="NUnit" Version="3.13.2" />
15+
<PackageReference Include="NUnit.ConsoleRunner" Version="3.14.0" />
16+
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
1417
</ItemGroup>
1518

1619
<ItemGroup>

Flexinets.Ldap.Core.Tests/LdapAttributeTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@ public class LdapAttributeTests
88
[TestCase]
99
public void TestLdapAttributeGetBytes()
1010
{
11-
var attribute = new LdapAttribute(UniversalDataType.Integer, (Byte)1);
11+
var attribute = new LdapAttribute(UniversalDataType.Integer, (byte)1);
1212
Assert.AreEqual("020101", Utils.ByteArrayToString(attribute.GetBytes()));
1313
}
1414

1515

1616
[TestCase]
1717
public void TestLdapAttributeGetBytes2()
1818
{
19-
var attribute = new LdapAttribute(UniversalDataType.Integer, (Byte)2);
19+
var attribute = new LdapAttribute(UniversalDataType.Integer, (byte)2);
2020
Assert.AreEqual("020102", Utils.ByteArrayToString(attribute.GetBytes()));
2121
}
2222

2323

2424
[TestCase]
2525
public void TestLdapAttributeGetBytesMaxInt()
2626
{
27-
var attribute = new LdapAttribute(UniversalDataType.Integer, Int32.MaxValue);
28-
Assert.AreEqual(Int32.MaxValue, attribute.GetValue<Int32>());
27+
var attribute = new LdapAttribute(UniversalDataType.Integer, int.MaxValue);
28+
Assert.AreEqual(int.MaxValue, attribute.GetValue<int>());
2929
}
3030

3131

Flexinets.Ldap.Core.Tests/LdapPacketTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public void TestLdapAttributeSequenceGetBytesString()
1313
var packet = new LdapPacket(1);
1414

1515
var bindrequest = new LdapAttribute(LdapOperation.BindRequest);
16-
bindrequest.ChildAttributes.Add(new LdapAttribute(UniversalDataType.Integer, (Byte)3));
16+
bindrequest.ChildAttributes.Add(new LdapAttribute(UniversalDataType.Integer, (byte)3));
1717
bindrequest.ChildAttributes.Add(new LdapAttribute(UniversalDataType.OctetString, "cn=bindUser,cn=Users,dc=dev,dc=company,dc=com"));
1818
bindrequest.ChildAttributes.Add(new LdapAttribute((byte)0, "bindUserPassword"));
1919

@@ -31,7 +31,7 @@ public void TestLdapAttributeSequenceGetBytes2()
3131

3232
var bindresponse = new LdapAttribute(LdapOperation.BindResponse);
3333

34-
var resultCode = new LdapAttribute(UniversalDataType.Enumerated, (Byte)LdapResult.success);
34+
var resultCode = new LdapAttribute(UniversalDataType.Enumerated, (byte)LdapResult.success);
3535
bindresponse.ChildAttributes.Add(resultCode);
3636

3737
var matchedDn = new LdapAttribute(UniversalDataType.OctetString);
@@ -105,8 +105,8 @@ public void TestLdapAttributeParseFromStream4()
105105
[TestCase]
106106
public void TestPacketMessageId()
107107
{
108-
var packet = new LdapPacket(Int32.MaxValue);
109-
Assert.AreEqual(Int32.MaxValue, packet.MessageId);
108+
var packet = new LdapPacket(int.MaxValue);
109+
Assert.AreEqual(int.MaxValue, packet.MessageId);
110110
}
111111

112112

@@ -176,7 +176,7 @@ public void TestPacketPartialAttribute()
176176

177177

178178
partialAttributeList.ChildAttributes.Add(new LdapPartialAttribute("uid", "useruidgoeshere"));
179-
partialAttributeList.ChildAttributes.Add(new LdapPartialAttribute("objectClass", new List<String> { "aaaaaaaaaaaa", "bbbbbbbbbbbb" }));
179+
partialAttributeList.ChildAttributes.Add(new LdapPartialAttribute("objectClass", new List<string> { "aaaaaaaaaaaa", "bbbbbbbbbbbb" }));
180180

181181
searchResultEntry.ChildAttributes.Add(partialAttributeList);
182182
responseEntryPacket.ChildAttributes.Add(searchResultEntry);
@@ -235,7 +235,7 @@ public void TestPacketThunderbirdSearch()
235235

236236

237237

238-
private void RecurseAttributes(LdapAttribute attribute, Int32 depth = 1)
238+
private void RecurseAttributes(LdapAttribute attribute, int depth = 1)
239239
{
240240
if (attribute != null)
241241
{

Flexinets.Ldap.Core.Tests/LdapPartialAttributeTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void TestLdapPartialAttributeSingleValue()
3030
[TestCase]
3131
public void TestLdapPartialAttributeMultipleValues()
3232
{
33-
var expected = new List<String> { "test", "foo", "bar" };
33+
var expected = new List<string> { "test", "foo", "bar" };
3434
var attribute = new LdapPartialAttribute("objectClass", expected);
3535

3636
var output = attribute.Values;

Flexinets.Ldap.Core.Tests/LdapTagTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public void TestLdapTag()
1414
IsConstructed = true
1515
};
1616
var tagbyte = tag.TagByte;
17-
Assert.AreEqual("00001100", Utils.BitsToString(new BitArray(new Byte[] { tagbyte })));
17+
Assert.AreEqual("00001100", Utils.BitsToString(new BitArray(new byte[] { tagbyte })));
1818
}
1919

2020

@@ -33,7 +33,7 @@ public void TestLdapTag2()
3333
{
3434
var tag = new Tag(UniversalDataType.Integer);
3535
var tagbyte = tag.TagByte;
36-
Assert.AreEqual("01000000", Utils.BitsToString(new BitArray(new Byte[] { tagbyte })));
36+
Assert.AreEqual("01000000", Utils.BitsToString(new BitArray(new byte[] { tagbyte })));
3737
}
3838

3939
[TestCase]
@@ -54,7 +54,7 @@ public void TestLdapTag3()
5454
IsConstructed = true
5555
};
5656
var tagbyte = tag.TagByte;
57-
Assert.AreEqual("11000110", Utils.BitsToString(new BitArray(new Byte[] { tagbyte })));
57+
Assert.AreEqual("11000110", Utils.BitsToString(new BitArray(new byte[] { tagbyte })));
5858
}
5959

6060
[TestCase]

0 commit comments

Comments
 (0)