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

        binder.InGlobal();

        // Act
        try
        {
            binder.To <CommandTest>();
        }
        catch (InvalidOperationException)
        {
            actual = true;
        }

        // Assert
        Assert.IsTrue(actual);
    }