Exemplo n.º 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"));
        }
Exemplo n.º 2
0
 public GetNamesWorkflow(MessageWorkflowState state, NamesDataSource source) : base(state)
 {
     _source = source;
 }
Exemplo n.º 3
0
 public ActionFactory(NamesDataSource source)
 {
     _source = source;
 }
Exemplo n.º 4
0
 public GetNamesListAction(NamesDataSource dataSource)
 {
     _dataSource = dataSource;
 }
Exemplo n.º 5
0
 public CanListNamesState(NamesDataSource dataSource)
 {
     _dataSource = dataSource;
 }