Ejemplo n.º 1
0
        public void WhenBicNotFound_ThenValidationFails(string bic, bool expected)
        {
            // Given
            var sut = new BicExistsValidator(() => new[] { "ABCDEFGJI123" });

            // When
            var result = sut.IsValid(new MakeTransfer {
                Bic = bic
            });

            // Then
            Assert.AreEqual(expected, result);
        }
Ejemplo n.º 2
0
        public void bic_exists_valid_should_be_expected(string bic, bool expected)
        {
            // Arrange
            string[] validCodes = { "A" };

            var cmd = new MakeTransfer {
                Bic = bic
            };

            var sut = new BicExistsValidator(() => validCodes);

            // Act
            var actual = sut.IsValid(cmd);

            // Assert
            Assert.Equal(expected, actual);
        }