Skip to content

Commit 4441d29

Browse files
author
Gennadii Shestakov
committed
fixed async warning and obsolete methods
1 parent 91cbbac commit 4441d29

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

FaunaDB.Client.Test/ClientTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ [Test] public async Task TestEvalContainsExpressions()
894894
// Deprecated
895895

896896
Assert.AreEqual(BooleanV.True,
897-
await client.Query(Contains(Path("favorites", "foods"), favoritesObj)));
897+
await client.Query(ContainsPath(Path("favorites", "foods"), favoritesObj)));
898898

899899
// Field
900900

@@ -1066,7 +1066,7 @@ [Test] public async Task TestEvalDivideExpression()
10661066
Assert.AreEqual(10L, res.To<long>().Value);
10671067
}
10681068

1069-
[Test] public async Task TestEvalDivideExpressionWrongArgument()
1069+
[Test] public void TestEvalDivideExpressionWrongArgument()
10701070
{
10711071
var ex = Assert.ThrowsAsync<BadRequest>(
10721072
async() => await client.Query(Divide(Null(), 10))
@@ -2587,7 +2587,7 @@ public async Task TestToDouble()
25872587
}
25882588

25892589
[Test]
2590-
public async Task TestThrowBadRequestOnDouble()
2590+
public void TestThrowBadRequestOnDouble()
25912591
{
25922592
var ex = Assert.ThrowsAsync<BadRequest>(
25932593
async () => await adminClient.Query(ToDouble(Now()))
@@ -2609,7 +2609,7 @@ public async Task TestToInteger()
26092609
}
26102610

26112611
[Test]
2612-
public async Task TestThrowBadRequestOnInteger()
2612+
public void TestThrowBadRequestOnInteger()
26132613
{
26142614
var ex = Assert.ThrowsAsync<BadRequest>(
26152615
async () => await adminClient.Query(ToInteger(Now()))

FaunaDB.Client.Test/DecoderTest.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ struct Point
4646
{
4747
public int X;
4848
public int Y;
49+
public Point(int x, int y)
50+
{
51+
X = x;
52+
Y = y;
53+
}
4954
}
5055

5156
struct Rect
@@ -214,6 +219,11 @@ public override bool Equals(object obj)
214219
Created == product.Created &&
215220
LastUpdated == product.LastUpdated;
216221
}
222+
223+
public override int GetHashCode()
224+
{
225+
return base.GetHashCode();
226+
}
217227
}
218228

219229
[Test]

FaunaDB.Client.Test/SerializationTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ [Test] public void TestEquals()
755755

756756
[Test] public void TestContains()
757757
{
758-
AssertJsonEqual(Contains(Arr("favorites", "foods"), Obj("favorites", Obj("foods", Arr("crunchings", "munchings", "lunchings")))),
758+
AssertJsonEqual(ContainsPath(Arr("favorites", "foods"), Obj("favorites", Obj("foods", Arr("crunchings", "munchings", "lunchings")))),
759759
"{\"contains\":[\"favorites\",\"foods\"],\"in\":{\"object\":{\"favorites\":{\"object\":{\"foods\":[\"crunchings\",\"munchings\",\"lunchings\"]}}}}}");
760760
}
761761

FaunaDB.Client.Test/StreamingTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async Task SetUpAsync()
2525
}
2626

2727
[Test]
28-
public async Task TestThatStreamFailsIfTargetDoesNotExist()
28+
public void TestThatStreamFailsIfTargetDoesNotExist()
2929
{
3030
AsyncTestDelegate doc = async () => { await adminClient.Stream(Get(Ref(Collection("streams_test"), "1234"))); };
3131

@@ -35,7 +35,7 @@ public async Task TestThatStreamFailsIfTargetDoesNotExist()
3535
}
3636

3737
[Test]
38-
public async Task TestStreamFailsIfIncorrectValuePassedToStreamMethod()
38+
public void TestStreamFailsIfIncorrectValuePassedToStreamMethod()
3939
{
4040
AsyncTestDelegate doc = async () => { await adminClient.Stream(Collection("streams_test")); };
4141

@@ -45,7 +45,7 @@ public async Task TestStreamFailsIfIncorrectValuePassedToStreamMethod()
4545
}
4646

4747
[Test]
48-
public async Task TestStreamFailsIfQueryIsNotReadOnly()
48+
public void TestStreamFailsIfQueryIsNotReadOnly()
4949
{
5050
AsyncTestDelegate doc = async () => { await adminClient.Stream(CreateCollection(Collection("streams_test"))); };
5151

0 commit comments

Comments
 (0)