public void GetMessagedTest() { IMittoMessageDao dal = Container.Resolve <IMittoMessageDao>(); var messageCriteris = new MessageSearchCriteria() { DateTimeFrom = DateTime.Now.AddDays(-5), DateTimeTo = DateTime.Now, Skip = 5, Take = 10 }; var result = dal.GetMessagesInRange(messageCriteris); Assert.IsNotNull(result); }
public void CommandHandlerTest() { var commandHandler = Container.Resolve <SmsCommandHandler>(); var message = new SmsRequest() { From = "049985", To = "888", Text = "Hello" }; ICommand command = new AddSmsCommand(message); // commandHandler.Handle(command); Assert.IsNotNull(commandHandler); IMittoMessageDao dal = Container.Resolve <IMittoMessageDao>(); }
public void GetCountryTest() { IMittoMessageDao dal = Container.Resolve <IMittoMessageDao>(); var countries = dal.GetCountries().ToList(); foreach (var country in countries) { Assert.IsNotNull(country); Assert.IsNotNull(country.MobileCountryCode); Assert.IsNotNull(country.PackageName); Assert.IsNotNull(country.PricePerSms); Assert.IsNotNull(country.CountryCode); } }
public MittoSmsController(ICommandBus bus, IMittoMessageDao dal, IEventDal eventDal) { _dal = dal; _bus = bus; _eventDal = eventDal; }