Exemple #1
0
        public void it_should_not_validate_content_without_validators()
        {
            this.factory = new MessageFactoryImpl();
            string type    = "EXCEPTION";
            string payload = "This is just a string";

            Message message = this.factory.Make(type, payload);

            Assert.Equal(type, message.Type);
            Assert.Equal(payload, message.Payload);
        }
Exemple #2
0
 public StoreImplTests()
 {
     this.messages         = new List <Message>();
     this.factory          = new MessageFactoryImpl();
     this.state            = new Dictionary <string, object>();
     this.messageValidator = new MessageValidatorImpl();
     this.reducers         = new HashSet <Reducer>();
     this.reducers.Add(new ReducerImpl("SAMPLE", this.messageValidator));
     this.reducers.Add(new ExceptionReducerImpl());
     this.store = new StoreImpl(this.reducers, this.state, this.messageValidator);
 }
Exemple #3
0
        public MessageFactoryImplTests()
        {
            PayloadValidators validators = new PayloadValidatorsFactory().Make();

            this.factory = new MessageFactoryImpl(validators);
        }