public void Test() { var chartKey = CreateTestChart(); var evnt = Client.Events.Create(chartKey); var result = Client.Events.ChangeObjectStatus(evnt.Key, new[] { "A-1", "A-2" }, "foo"); Assert.Equal("foo", Client.Events.RetrieveObjectInfo(evnt.Key, "A-1").Status); Assert.Equal("foo", Client.Events.RetrieveObjectInfo(evnt.Key, "A-2").Status); Assert.Equal(EventObjectInfo.Free, Client.Events.RetrieveObjectInfo(evnt.Key, "A-3").Status); CustomAssert.ContainsOnly(new[] { "A-1", "A-2" }, result.Objects.Keys); var reportItem = result.Objects["A-1"]; Assert.Equal("A-1", reportItem.Label); reportItem.Labels.Should().BeEquivalentTo(new Labels("1", "seat", "A", "row")); reportItem.IDs.Should().BeEquivalentTo(new IDs("1", "A", null)); Assert.Equal("foo", reportItem.Status); Assert.Equal("Cat1", reportItem.CategoryLabel); Assert.Equal("9", reportItem.CategoryKey); Assert.Equal("seat", reportItem.ObjectType); Assert.Null(reportItem.TicketType); Assert.Null(reportItem.OrderId); Assert.True(reportItem.ForSale); Assert.Null(reportItem.Section); Assert.Null(reportItem.Entrance); Assert.Null(reportItem.NumBooked); Assert.Null(reportItem.Capacity); Assert.Null(reportItem.LeftNeighbour); Assert.Equal("A-2", reportItem.RightNeighbour); }
public void ByLabel_BookWholeTablesModeFalse() { var chartKey = CreateTestChartWithTables(); var report = Client.ChartReports.ByLabel(chartKey, "false"); CustomAssert.ContainsOnly(new [] { "T1-1", "T1-2", "T1-3", "T1-4", "T1-5", "T1-6", "T2-1", "T2-2", "T2-3", "T2-4", "T2-5", "T2-6" }, report.Keys); }
public void ByLabel_BookWholeTablesModeTrue() { var chartKey = CreateTestChartWithTables(); var report = Client.ChartReports.ByLabel(chartKey, "true"); CustomAssert.ContainsOnly(new [] { "T1", "T2" }, report.Keys); }
public void SpecialCharacters() { var chart = Client.Charts.Create(); Client.Charts.AddTag(chart.Key, "'tag1:-'/&?<>"); Chart retrievedChart = Client.Charts.Retrieve(chart.Key); CustomAssert.ContainsOnly(new[] { "'tag1:-'/&?<>" }, retrievedChart.Tags); }
public void Test() { var chart = Client.Charts.Create(); Client.Charts.AddTag(chart.Key, "tag1"); Client.Charts.AddTag(chart.Key, "tag2"); Chart retrievedChart = Client.Charts.Retrieve(chart.Key); CustomAssert.ContainsOnly(new[] { "tag1", "tag2" }, retrievedChart.Tags); }
public void Test() { var chartKey = CreateTestChart(); var evnt = Client.Events.Create(chartKey); var result = Client.Events.Book(evnt.Key, new[] { "A-1", "A-2" }); Assert.Equal(EventObjectInfo.Booked, Client.Events.RetrieveObjectInfo(evnt.Key, "A-1").Status); Assert.Equal(EventObjectInfo.Booked, Client.Events.RetrieveObjectInfo(evnt.Key, "A-2").Status); Assert.Equal(EventObjectInfo.Free, Client.Events.RetrieveObjectInfo(evnt.Key, "A-3").Status); CustomAssert.ContainsOnly(new[] { "A-1", "A-2" }, result.Objects.Keys); }
public void Test() { var chart1 = Client.Charts.Create(); Client.Charts.AddTag(chart1.Key, "tag1"); Client.Charts.AddTag(chart1.Key, "tag2"); var chart2 = Client.Charts.Create(); Client.Charts.AddTag(chart2.Key, "tag3"); var tags = Client.Charts.ListAllTags(); CustomAssert.ContainsOnly(new[] { "tag1", "tag2", "tag3" }, tags); }
public void Test() { var chartKey = CreateTestChart(); var evnt = Client.Events.Create(chartKey); HoldToken holdToken = Client.HoldTokens.Create(); var result = Client.Events.Hold(evnt.Key, new[] { "A-1", "A-2" }, holdToken.Token); var objectInfo1 = Client.Events.RetrieveObjectInfo(evnt.Key, "A-1"); Assert.Equal(EventObjectInfo.Held, objectInfo1.Status); Assert.Equal(holdToken.Token, objectInfo1.HoldToken); var objectInfo2 = Client.Events.RetrieveObjectInfo(evnt.Key, "A-2"); Assert.Equal(EventObjectInfo.Held, objectInfo2.Status); Assert.Equal(holdToken.Token, objectInfo2.HoldToken); CustomAssert.ContainsOnly(new[] { "A-1", "A-2" }, result.Objects.Keys); }
public void Test() { var chart = Client.Charts.Create(); Client.Charts.AddTag(chart.Key, "tag1"); Client.Charts.AddTag(chart.Key, "tag2"); Chart retrievedChart = Client.Charts.Retrieve(chart.Key); Assert.NotEqual(0, retrievedChart.Id); Assert.NotNull(retrievedChart.Key); Assert.Equal("NOT_USED", retrievedChart.Status); Assert.Equal("Untitled chart", retrievedChart.Name); Assert.NotNull(retrievedChart.PublishedVersionThumbnailUrl); Assert.Null(retrievedChart.DraftVersionThumbnailUrl); Assert.Null(retrievedChart.Events); CustomAssert.ContainsOnly(new[] { "tag1", "tag2" }, retrievedChart.Tags); Assert.False(retrievedChart.Archived); }