Пример #1
0
        public void CreateANewAccount_AccoutExists_ReturnAccountExist()
        {
            // Arrange
            var    unitUnderTest = this.CreateAccountAPI();
            string id            = "A123456789";

            subAccountRepo.IsExist(Arg.Any <string>()).Returns(true);

            string expected = "此身分證已建立過帳號";

            // Act
            var result = unitUnderTest.CreateANewAccount(
                id);

            // Assert
            Assert.Equal(expected, result);
            subAccountRepo.DidNotReceive().Create(Arg.Any <string>());
        }