Ejemplo n.º 1
0
    public void CommandBinding_InSequence()
    {
        // Arrange
        var container = new CommandContainerTest();
        var key       = typeof(object);
        var binder    = new CommandBinding(container, key, null, null);

        binder.InGlobal();

        // Act
        binder.InSequence();
        var actual = binder.IsSequence;

        // Assert
        Assert.IsTrue(actual);
    }
Ejemplo n.º 2
0
    public void CommandBinding_InSequence_Exception()
    {
        // Arrange
        var actual    = false;
        var container = new CommandContainerTest();
        var key       = typeof(object);
        var binder    = new CommandBinding(container, key, null, null);

        // Act
        try
        {
            binder.InSequence();
        }
        catch (InvalidOperationException)
        {
            actual = true;
        }

        // Assert
        Assert.IsTrue(actual);
    }