Exemple #1
0
        public void WhenOneNameConfiguredInListItIsReturnedByAction()
        {
            var dataSource = new NamesDataSource(new List <string>()
            {
                "Bob"
            });

            var workflow    = new GetNamesWorkflow(new MessageWorkflowState(), dataSource);
            var firstAction = workflow.GetActions().First();


            var namesFromAction = firstAction.ExcuteAction(null);

            Assert.That(namesFromAction, Is.AssignableTo <IEnumerable <string> >());
            var namesList = namesFromAction as IEnumerable <string>;

            Assert.That(namesList, Contains.Item("Bob"));
        }
Exemple #2
0
 public GetNamesWorkflow(MessageWorkflowState state, NamesDataSource source) : base(state)
 {
     _source = source;
 }
Exemple #3
0
 public ActionFactory(NamesDataSource source)
 {
     _source = source;
 }
Exemple #4
0
 public GetNamesListAction(NamesDataSource dataSource)
 {
     _dataSource = dataSource;
 }
Exemple #5
0
 public CanListNamesState(NamesDataSource dataSource)
 {
     _dataSource = dataSource;
 }