public void GetActivitiesFilterOnTagsRequireAll() { var proxy = new ActivitiesProxy(); var response = proxy.GetActivities(tags: "red, blue", tagFilterType: "requireAll"); Assert.True(response.IsSuccessfull, "Call to GetActivitiesFilterOnTagsRequireAny was not successful"); Assert.NotNull(response.DataObject); Assert.Null(response.DataObject.Activities.FirstOrDefault(a => !a.Tags.Contains("red") || !a.Tags.Contains("blue"))); }
public void GetActivitiesFilterAttachedToTypeAndAttachedToId() { var proxy = new ActivitiesProxy(); var response = proxy.GetActivities(attachedToType: "sale", attachedToId: _saleInvoiceTranId2); Assert.True(response.IsSuccessfull, "Call to GetActivitiesFilterAttachedToTypeAndAttachedToId was not successful"); Assert.NotNull(response.DataObject); Assert.Null(response.DataObject.Activities.FirstOrDefault(a => a.AttachedToType.ToLower() != "sale" && a.AttachedToId != _saleInvoiceTranId2)); }
public void GetActivitiesFilterFromAndToDate() { var proxy = new ActivitiesProxy(); var response = proxy.GetActivities(fromDate: DateTime.Now.AddDays(-1), toDate: DateTime.Now.AddDays(-1)); Assert.True(response.IsSuccessfull, "Call to GetActivitiesFilterFromAndToDate was not successful"); Assert.NotNull(response.DataObject); Assert.Null(response.DataObject.Activities.FirstOrDefault(a => a.Due != DateTime.Now.AddDays(-1))); }
public void GetActivitiesFilterOwnerEmail() { var proxy = new ActivitiesProxy(); var response = proxy.GetActivities(ownerEmail: TestConfig.TestUser); Assert.True(response.IsSuccessfull, "Call to GetActivitiesFilterOwnerEmail was not successful"); Assert.NotNull(response.DataObject); Assert.Null(response.DataObject.Activities.FirstOrDefault(a => a.OwnerEmail != TestConfig.TestUser)); }
public void GetActivitiesFilterOnStatus() { var proxy = new ActivitiesProxy(); var response = proxy.GetActivities(activityStatus: "done"); Assert.True(response.IsSuccessfull, "Call to GetActivitiesFilterOnStatus was not successful"); Assert.NotNull(response.DataObject); Assert.Null(response.DataObject.Activities.FirstOrDefault(a => !a.Done)); }
public void GetActivitiesFilterOnType() { var proxy = new ActivitiesProxy(); var response = proxy.GetActivities(activityType: "Task"); Assert.True(response.IsSuccessfull, "Call to GetActivities was not successful"); Assert.NotNull(response.DataObject); Assert.Null(response.DataObject.Activities.FirstOrDefault(a => a.ActivityType != "Task")); }
public void GetActivities() { var proxy = new ActivitiesProxy(); var response = proxy.GetActivities(); Assert.True(response.IsSuccessfull, "Call to GetActivities was not successful"); Assert.NotNull(response.DataObject); Assert.True(response.DataObject.Activities.Count > 1, "Call to GetActivities returned too few rows"); }
public void GetActivitiesFilterOnTagsExcludeAny() { var proxy = new ActivitiesProxy(); var response = proxy.GetActivities(tags: "red, blue", tagFilterType: "excludeAny"); Assert.IsTrue(response.IsSuccessfull, "Call to GetActivitiesFilterOnTagsExcludeAny was not successful"); Assert.IsNotNull(response.DataObject, "Call to GetActivitiesFilterOnTagsExcludeAny returned no data"); Assert.IsNull(response.DataObject.Activities.Where(a => a.Tags.Contains("red") || a.Tags.Contains("blue")).FirstOrDefault()); }