Example #1
0
        public void BicTestSample()
        {
            BicCode cimbBicCode = BicCode.FromString(BicCodesConsts.MY_CIMB_KL);

            Assert.Equal("CIBBMYKL", cimbBicCode.Code);
            Assert.Equal(CountryIso2Code.Malaysia, cimbBicCode.CountryCode);
        }
        public void BicCodesShouldPass(string bicCode)
        {
            // Arrange
            Result <BicCode> myBicCode;

            // Act
            myBicCode = BicCode.Create(bicCode);
            // Assert
            myBicCode.IsSuccess.Should().BeTrue();
        }
Example #3
0
        public Result <Bank> SetBic(string value)
        {
            var bicCode = BicCode.Create(value);

            if (bicCode.IsFailure)
            {
                return(Result.Failure <Bank>(bicCode.Error));
            }
            _bicCode = bicCode.Value;
            return(Result.Success(this));
        }