public void HasErrors_False_WhenHandledErrors() { var batch = new OperationBatch(context); var op = new InsertOperation("movies", Guid.NewGuid().ToString()); var errors = new TableOperationError[] { new TableOperationError(op, context, null, null, null) { Handled = true } }; Assert.False(batch.HasErrors(errors)); }
public void Ctor_LoadsErrors_FromList() { var errors = new List <TableOperationError>(); var context = new SyncContext(GetMockClient(), new MockOfflineStore()); for (int i = 0; i < 5; i++) { var op = new InsertOperation("movies", Guid.NewGuid().ToString()); var error = new TableOperationError(op, context, null, null, JObject.Parse("{}")); errors.Add(error); } var sut = new PushCompletionResult(errors.ToArray(), PushStatus.Complete); Assert.Equal(5, sut.Errors.Count); Assert.Equal(PushStatus.Complete, sut.Status); }