예제 #1
0
        public void AnalysisResultIsNull_ArgumentNullExceptionThrown()
        {
            // Arrange

            AnalysisResult analysisResult = null;

            // Act
            Action action = () => _builderModelCreator.Create(analysisResult);

            // Assert
            Assert.Throws <ArgumentNullException>("analysisResult", action);
        }
예제 #2
0
        public string Generate(string classAsAString)
        {
            var analyzer       = new ClassAnalyzer();
            var analysisResult = analyzer.Analyze(classAsAString);

            var modelCreator = new BuilderModelCreator();
            var model        = modelCreator.Create(analysisResult);

            var codeGenerator = new BuilderCodeGenerator();

            return(codeGenerator.Generate(model));
        }