public void WaitingForActivateToLiveScenario() { var dateTimeCreatorMock = new Mock <IDateTimeCreator>(); var sut = new Mobile(dateTimeCreatorMock.Object, new MobileDataEntity { Id = 101, GlobalId = Guid.NewGuid(), State = Mobile.MobileState.WaitingForActivate.ToString() }); var activateOrder = new Order(new OrderDataEntity { GlobalId = Guid.NewGuid(), Name = "Name", ContactPhoneNumber = "0123456789", State = "New" }); sut.Activate(activateOrder); sut.State.Should().Be(Mobile.MobileState.ProcessingActivate); sut.InProgressOrder.CurrentState.Should().Be(Api.Domain.Order.State.New); sut.OrderProcessing(); sut.InProgressOrder.CurrentState.Should().Be(Api.Domain.Order.State.Processing); sut.OrderSent(); sut.InProgressOrder.CurrentState.Should().Be(Api.Domain.Order.State.Sent); sut.ActivateCompleted(); sut.State.Should().Be(Mobile.MobileState.Live); sut.InProgressOrder.Should().BeNull(); sut.Orders.First().CurrentState.Should().Be(Api.Domain.Order.State.Completed); }
private void showMessage(SMS message) { mobile.SetText(message.Content); mobile.senderName.text = message.Sender; mobile.PlayMessageNotification(); mobile.Activate(); cash = cash + message.Transaction; }
public ActivateShould() { var dateTimeCreatorMock = new Mock <IDateTimeCreator>(); sut = new Mobile(dateTimeCreatorMock.Object, new MobileDataEntity { Id = 101, GlobalId = Guid.NewGuid(), State = Mobile.MobileState.WaitingForActivate.ToString() }); sut.Activate(new Order(new OrderDataEntity { GlobalId = Guid.NewGuid(), Name = "Name", ContactPhoneNumber = "0123456789", State = "New" })); }