예제 #1
0
        public CodeClass MockCodeClass <T>(Project project = null)
        {
            if (project == null)
            {
                project = _solutionManager.Object.DefaultProject;
            }
            var mockCodeClass = MockCodeClassBuilder.BuildMockCodeClass(typeof(T), _projectTypeLocator, project);

            _projectTypeLocator.Setup(x => x.FindTypes(project, mockCodeClass.Name)).Returns(new[] { (CodeType)mockCodeClass });
            return(mockCodeClass);
        }
예제 #2
0
 public string MockCodeClass <T>()
 {
     return(MockCodeClassBuilder.BuildMockCodeClass(typeof(T), _projectTypeLocator, _solutionManager.Object.DefaultProject).Name);
 }