public void AcceptedTicket_AbleToChangeToClosedOrRejected() { Ticket newTicket = new Ticket(); newTicket.Accept(); Assert.True(newTicket.IsCloseable); Assert.True(newTicket.IsRejectable); }
public void ClosedTicket_CannotChangeStatusAnymore() { Ticket newTicket = new Ticket(); newTicket.Accept(); newTicket.Close(); Assert.False(newTicket.IsAcceptable); Assert.False(newTicket.IsRejectable); }
public void AcceptedTicket_ableToChangeToClosedOrRejected() { var t = new Ticket(); t.Title = "Test Ticket"; t.Body = "Blah blah"; t.Accept(); Assert.False(t.CanChangeTo(TicketStatus.New)); Assert.False(t.CanChangeTo(TicketStatus.Accepted)); Assert.True(t.CanChangeTo(TicketStatus.Rejected)); Assert.True(t.CanChangeTo(TicketStatus.Closed)); }
public void ChangeFromNewToAccepted() { var t = new Ticket(); Assert.True(t.Status == TicketStatus.New); Assert.Equal(1, t.TicketStates.Count()); t.Accept(); Assert.True(t.Status == TicketStatus.Accepted); Assert.Equal(2, t.TicketStates.Count()); }
public void ClosedTicket_CannotChangeStatusAnymore() { var t = new Ticket(); t.Title = "Test Ticket"; t.Body = "Blah blah"; t.Accept(); t.Close(); Assert.False(t.CanChangeTo(TicketStatus.New)); Assert.True(t.CanChangeTo(TicketStatus.Accepted)); Assert.False(t.CanChangeTo(TicketStatus.Rejected)); Assert.False(t.CanChangeTo(TicketStatus.Closed)); }
public void AcceptedTicket_AbleToChangeToClosedOrRejected() { using (var app = new App(testing: true)) { var t = new Ticket(); app.Tickets.Add(t); t.Accept(); Assert.False(t.IsAcceptable); Assert.True(t.IsRejectable); Assert.True(t.IsCloseable); } }
public void ChangeFromNewToAccepted() { using (var app = new App(testing: true)) { var t = new Ticket(); app.Tickets.Add(t); Assert.True(t.Status == TicketStatus.New); Assert.Equal(1, t.TicketStates.Count()); t.Accept(); Assert.True(t.Status == TicketStatus.Accepted); Assert.Equal(2, t.TicketStates.Count()); } }
public void ClosedTicket_CannotChangeStatusAnymore() { using (var app = new App(testing: true)) { var t = new Ticket(); app.Tickets.Add(t); t.Accept(); t.Close(); Assert.False(t.IsAcceptable); Assert.False(t.IsRejectable); Assert.False(t.IsCloseable); } }