Skip to content

Commit cc7be64

Browse files
author
Gennadii Shestakov
committed
fixed other warnings
1 parent 4441d29 commit cc7be64

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

FaunaDB.Client.Test/DecoderTest.cs

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ public Point(int x, int y)
5656
struct Rect
5757
{
5858
public Point UpperLeft;
59-
public Point BottonRight;
59+
public Point BottomRight;
60+
public Rect(Point upperLeft, Point bottomRight)
61+
{
62+
UpperLeft = upperLeft;
63+
BottomRight = bottomRight;
64+
}
6065
}
6166

6267
[Test]
@@ -83,7 +88,7 @@ public void TestNullToValueTypes()
8388

8489
Assert.AreEqual(default(Rect), Decode<Rect>(NullV.Instance));
8590
Assert.AreEqual(default(Rect), Decode<Rect>(ObjectV.Empty));
86-
Assert.AreEqual(default(Rect), Decode<Rect>(ObjectV.With("UpperLeft", NullV.Instance, "BottonRight", NullV.Instance)));
91+
Assert.AreEqual(default(Rect), Decode<Rect>(ObjectV.With("UpperLeft", NullV.Instance, "BottomRight", NullV.Instance)));
8792

8893
//
8994

@@ -379,7 +384,7 @@ class MissingPropertiesOnConstructor
379384
public string Field1 { get; set; }
380385

381386
[FaunaField("a_missing_field")]
382-
string field2;
387+
string field2 = default(string);
383388

384389
public string Field2 { get { return field2; } }
385390

@@ -409,7 +414,7 @@ class MissingPropertiesOnMethodCreator
409414
public string Field1 { get; set; }
410415

411416
[FaunaField("a_missing_field")]
412-
string field2;
417+
string field2 = default(string);
413418

414419
public string Field2 { get { return field2; } }
415420

@@ -711,13 +716,24 @@ struct NestedStruct
711716
{
712717
public byte? aByte;
713718
public short? aShort;
719+
public NestedStruct(byte? abyte, short? ashort)
720+
{
721+
aByte = abyte;
722+
aShort = ashort;
723+
}
714724
}
715725

716726
struct StructWithNullableFields
717727
{
718728
public int? anInteger;
719729
public double? aDouble;
720730
public NestedStruct? aStruct;
731+
public StructWithNullableFields(int? intVal, double? doubleVal, NestedStruct? structVal)
732+
{
733+
anInteger = intVal;
734+
aDouble = doubleVal;
735+
aStruct = structVal;
736+
}
721737
}
722738

723739
[Test]

FaunaDB.Client.Test/FaunaDB.Client.Test.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
net45 => applicable for .net framework version up to 4.8, means if you target
1313
.net frameworks net45 till net48, FaunaDB.Client net45 build will be used
1414
-->
15-
<TargetFrameworks>net45;netcoreapp1.1;netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
15+
<TargetFrameworks>net45;netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
16+
</PropertyGroup>
17+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net45|AnyCPU'">
18+
<WarningsAsErrors>;NU1605</WarningsAsErrors>
19+
<NoWarn>1701;1702;</NoWarn>
1620
</PropertyGroup>
1721

1822
<ItemGroup>

FaunaDB.Client.Test/SerializationTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ [Test] public void TestEquals()
756756
[Test] public void TestContains()
757757
{
758758
AssertJsonEqual(ContainsPath(Arr("favorites", "foods"), Obj("favorites", Obj("foods", Arr("crunchings", "munchings", "lunchings")))),
759-
"{\"contains\":[\"favorites\",\"foods\"],\"in\":{\"object\":{\"favorites\":{\"object\":{\"foods\":[\"crunchings\",\"munchings\",\"lunchings\"]}}}}}");
759+
"{\"contains_path\":[\"favorites\",\"foods\"],\"in\":{\"object\":{\"favorites\":{\"object\":{\"foods\":[\"crunchings\",\"munchings\",\"lunchings\"]}}}}}");
760760
}
761761

762762
[Test] public void TestSelect()

0 commit comments

Comments
 (0)