Skip to content

Commit

Permalink
fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
MongoCaleb committed Jul 23, 2024
1 parent 749453a commit 52871da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
21 changes: 7 additions & 14 deletions examples/dotnet/Examples/DataSyncExamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,27 @@ public class DataSyncExamples
[OneTimeSetUp]
public void Setup()
{

const string myRealmAppId = Config.FSAppId;
app = App.Create(myRealmAppId);
user = app.LogInAsync(
Credentials.Anonymous()).Result;

config = new FlexibleSyncConfiguration(user)
;
config = new FlexibleSyncConfiguration(user);
}

[Test]
public void StartStopSession()
{
// :snippet-start: pause-synced-realm
public void GetSessionAndState(){
// :snippet-start: get-sync-session
realm = Realm.GetInstance(config);
var session = realm.SyncSession;
// :snippet-end:
// :snippet-start: pause-synced-realm
realm = Realm.GetInstance(config);
session = realm.SyncSession;
session.Stop();
//later...
session.Start();
// :snippet-end:
}

[Test]
public void GetSessionAndState(){
// :snippet-start: get-sync-session
realm = Realm.GetInstance(config);
var session = realm.SyncSession;
// :snippet-end:
// :snippet-start: get-session-state
var sessionState = session.State;
if (sessionState == SessionState.Active){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
realm = Realm.GetInstance(config);
var session = realm.SyncSession;
session = realm.SyncSession;
session.Stop();
//later...
session.Start();

0 comments on commit 52871da

Please sign in to comment.