예제 #1
0
        public void AffectsWpfCommand_Null_ShouldThrow()
        {
            // Arrange
            var emptyFluentAction = new EmptyFluentAction();

            // Act & Assert
            Should.Throw <ArgumentNullException>(() => emptyFluentAction.Affects((IWpfCommand)null));
        }
예제 #2
0
        public void AffectsProperty_ReturnsSelf()
        {
            // Arrange
            var emptyFluentAction = new EmptyFluentAction();

            // Act & Assert
            emptyFluentAction.Affects(new Fixture().Create <string>()).ShouldBeSameAs(emptyFluentAction);
        }
예제 #3
0
        public void AffectsIWpfCommand_ReturnsSelf()
        {
            // Arrange
            var fixture           = new Fixture().Customize(new AutoMoqCustomization());
            var emptyFluentAction = new EmptyFluentAction();

            // Act & Assert
            emptyFluentAction.Affects(fixture.Create <IWpfCommand>()).ShouldBeSameAs(emptyFluentAction);
        }
예제 #4
0
        public void AffectsProperty_NullEmptyOrWhiteSpace_ShouldThrow(string propertyName)
        {
            // Arrange
            var emptyFluentAction = new EmptyFluentAction();

            // Act & Assert
            ArgumentException exception = Should.Throw <ArgumentException>(() => emptyFluentAction.Affects(propertyName));

            exception.Message.ShouldContain("null");
            exception.Message.ShouldContain("empty");
            exception.Message.ShouldContain("white-space characters");
        }