Esempio n. 1
0
        public void Test_For_Valid_ScheduleBus()
        {
            //Arrange
            BusInformation bus = new BusInformation()
            {
                BusId    = "b1",
                BusName  = "SemiAC",
                BusType  = "AC",
                Capacity = 30
            };
            var customer = new Customer()
            {
                CustomerId      = "1234",
                Name            = "Rose",
                Address         = "Bangalore",
                City            = "Bangalore",
                State           = "Karnataka",
                Country         = "India",
                PinCode         = 600867,
                Email           = "*****@*****.**",
                Gender          = "Female",
                DateOfBirth     = new DateTime(1990, 04, 12),
                CustomerType    = "Normal",
                Password        = "******",
                ConfirmPassword = "******",
            };

            //Action
            var IsAdded = _services.ScheduleBus(bus, customer);

            //Assert
            Assert.True(IsAdded);
        }
Esempio n. 2
0
        private async Task <DialogTurnResult> BusInfoStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
        {
            busDetail.StationName = busDetail.StationName == null?stepContext.Context.Activity.Text : stepContext.Result.ToString();

            string msg = await BusInformation.GetBusArrTimeAsync(busDetail.RouteNum, busDetail.StationName);

            await stepContext.Context.SendActivityAsync(MessageFactory.Text(msg), cancellationToken);

            return(await stepContext.EndDialogAsync(null, cancellationToken));
        }
        private async Task <DialogTurnResult> BusInfoStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
        {
            busDetail.StationName = busDetail.StationName == null?stepContext.Context.Activity.Text : stepContext.Result.ToString();

            (string arrmsg1, string arrmsg2) = await BusInformation.GetBusArrTimeAsync(busDetail.RouteNum, busDetail.StationName);

            CardGenerator cardGenerator = new CardGenerator();

            await cardGenerator.AttachBusCardAsync(stepContext.Context, busDetail, arrmsg1, arrmsg2, cancellationToken);

            return(await stepContext.EndDialogAsync(null, cancellationToken));
        }
Esempio n. 4
0
        public void Test_For_Valid_AddNewBus()
        {
            //Arrange
            BusInformation bus = new BusInformation()
            {
                BusId    = "b1",
                BusName  = "SemiAC",
                BusType  = "AC",
                Capacity = 30
            };
            //Action
            var IsAdded = _services.AddNewBus(bus);

            //Assert
            Assert.True(IsAdded);
        }
 public bool ScheduleBus(BusInformation bus, Customer customer)
 {
     throw new NotImplementedException();
 }
 public bool AddNewBus(BusInformation bus)
 {
     throw new NotImplementedException();
 }