Esempio n. 1
0
        public async Task GenerateSqlForType_TypeNeedsUserInfo_ShouldCallUserInputRepo()
        {
            //Act
            await _service.GenerateSqlForType("path", "type", "output", false);

            //Assert
            _userInputRepoMock.Verify(x =>
                                      x.GetUserInput(
                                          UserInputService.GetLengthMessage("PublicTestString")
                                          ),
                                      Times.Once
                                      );
        }
        public void GetUserInfo_ClassContainsString_ShouldAskUserForLength()
        {
            //Assemble
            _classInfo.Properties[0].ValidType = ValidType.String;

            //Act
            UserInputService.GetUserInfo(_classInfo, _mockRepo.Object);

            //Assert
            _mockRepo.Verify(
                x => x.GetUserInput(UserInputService.GetLengthMessage(
                                        _classInfo.Properties[0].CSharpName
                                        )),
                Times.Once
                );
        }