예제 #1
0
        public void WhenPositionAcquiredThenTargetUpdated()
        {
            var positionAcquired = new PositionAcquired(1.0M);

            stopLossManager.Consume(positionAcquired);

            var events        = bus.GetMessages();
            var targetUpdated = events.First() as TargetUpdated;

            Assert.NotNull(targetUpdated);
            Assert.Equal(targetUpdated.TargetPrice, 0.9M);
        }
예제 #2
0
        public void WhenPositionAcquiredThenTargetUpdated()
        {
            var positionAcquired = new PositionAcquired(1.0M);

            stopLossManager.Consume(positionAcquired);

            var events        = bus.GetMessages();
            var targetUpdated = events.First() as TargetUpdated;

            Assert.That(targetUpdated, Is.Not.Null, "Should be TargetUpdated");
            Assert.That(targetUpdated.TargetPrice, Is.EqualTo(0.9M));
        }