コード例 #1
0
        public void Should_create_simple_pose()
        {
            var called = false;
            var b      = new PoseBuilder();
            var pose   = b.ShouldBe(_part1, State.Opened).HoldPoseFor(0).Build("p");

            pose.Begin += (sender, args) => {
                called = true;
            };
            _part1.IsOpen = true;
            Assert.IsTrue(called);
        }
コード例 #2
0
        public void Should_set_initial_value()
        {
            _part1.IsOpen = true;
            var called = false;
            var b      = new PoseBuilder();
            var pose   = b.ShouldBe(_part1, State.Opened)
                         .ShouldBe(_part2, State.Opened)
                         .HoldPoseFor(0).Build("p");

            pose.Begin += (sender, args) => {
                called = true;
            };
            _part2.IsOpen = true;
            Assert.IsTrue(called);
        }