Example #1
0
        public void Success_OnGeneratingTypesWhenModelsTypesEmpty()
        {
            // Arrange

            // Act
            var result = _objectUnderTest.GenerateTypesSourceCodeFiles(_projectName, new ModelData());

            // Assert
            Assert.IsTrue(result);
            Assert.AreEqual(string.Empty, _objectUnderTest.GetOutputMessage());
        }
Example #2
0
        public void Fail_OnGeneratingModelWhenModelNameEmpty()
        {
            // Arrange
            _loggerListenerMock.Setup(listener => listener.Warn(LoggingText.GenerateInformationModelFailureEmptyModelName)).Callback(delegate { _loggerWroteOut = true; });

            // Act
            var result = _objectUnderTest.GenerateNodesetSourceCodeFiles(_projectName, new ModelData(), new List <RequiredModelsData>());

            // Assert
            Assert.IsFalse(result);
            Assert.IsTrue(_loggerWroteOut);
            Assert.AreEqual(string.Format(OutputText.GenerateInformationModelFailureEmptyModelName, _projectName), _objectUnderTest.GetOutputMessage());
        }