public void SetupFixture()
        {
            _map = new OperationMap();

            _map.MapOperation(typeof(TestOperation));
            _map.MapOperation(typeof(TestOperationWithResponse));

            _serializer = new SerializationService(new BinarySerializer());
        }
Exemplo n.º 2
0
        public void ShouldRetrieveOperationByType()
        {
            var map = new OperationMap();

            var mappedOperation = map.MapOperation(typeof(TestOperation));

            map.GetMappedOperation(mappedOperation.OperationType).ShouldBe(mappedOperation);
        }
Exemplo n.º 3
0
        public void ShouldMapOperations()
        {
            var map = new OperationMap();

            var mappedOperation = map.MapOperation(typeof(TestOperation));

            mappedOperation.OperationType.ShouldBe(typeof(TestOperation));
        }
Exemplo n.º 4
0
        public void ShouldSucceedInTryingToFindOperationByName()
        {
            var map             = new OperationMap();
            var mappedOperation = map.MapOperation(typeof(TestOperation));

            Type foundType;
            var  success = map.TryGetMappedOperation("TestOperation", out foundType);

            success.ShouldBeTrue();
            foundType.ShouldBe(mappedOperation.OperationType);
        }
 public void SetupFixture()
 {
     _map = new OperationMap();
     _map.MapOperation(typeof(TestOperation));
     _map.MapOperation(typeof(TestOperationWithResponse));
 }