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

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

            _serializer = new SerializationService(new BinarySerializer());
        }
예제 #2
0
        public void ShouldRetrieveOperationByType()
        {
            var map = new OperationMap();

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

            map.GetMappedOperation(mappedOperation.OperationType).ShouldBe(mappedOperation);
        }
예제 #3
0
        public void ShouldMapOperations()
        {
            var map = new OperationMap();

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

            mappedOperation.OperationType.ShouldBe(typeof(TestOperation));
        }
예제 #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));
 }