Ejemplo n.º 1
0
        public WorkspaceBoilerplateSettingsStore(
            string settingsFilePath,
            IDictionary <string, string> templates,
            string preferredTestFrameworkName,
            string preferredMockFrameworkName,
            string fileNameTemplate,
            IDictionary <string, string> customMocks,
            string customMockFieldDeclarationTemplate,
            string customMockFieldInitializationTemplate,
            string customMockObjectReferenceTemplate)
        {
            this.settingsFilePath = settingsFilePath;

            this.jsonObject = new BoilerplateSettingsJson
            {
                Version = 1,
                PreferredTestFrameworkName            = preferredTestFrameworkName,
                PreferredMockFrameworkName            = preferredMockFrameworkName,
                FileNameTemplate                      = fileNameTemplate,
                CustomMockFieldDeclarationTemplate    = customMockFieldDeclarationTemplate,
                CustomMockFieldInitializationTemplate = customMockFieldInitializationTemplate,
                CustomMockObjectReferenceTemplate     = customMockObjectReferenceTemplate,
                Templates = templates
            };

            if (customMocks != null && customMocks.Count > 0)
            {
                this.jsonObject.CustomMocks = customMocks;
            }
        }
Ejemplo n.º 2
0
        public WorkspaceBoilerplateSettingsStore(
            string settingsFilePath,
            IDictionary <string, string> templates,
            string preferredTestFrameworkName,
            string preferredMockFrameworkName,
            string fileNameTemplate)
        {
            this.settingsFilePath = settingsFilePath;

            this.jsonObject = new BoilerplateSettingsJson
            {
                Version = 1,
                PreferredTestFrameworkName = preferredTestFrameworkName,
                PreferredMockFrameworkName = preferredMockFrameworkName,
                FileNameTemplate           = fileNameTemplate,
                Templates = templates
            };
        }
Ejemplo n.º 3
0
        public WorkspaceBoilerplateSettingsStore(string settingsFilePath)
        {
            this.settingsFilePath = settingsFilePath;

            this.jsonObject = JsonConvert.DeserializeObject <BoilerplateSettingsJson>(File.ReadAllText(settingsFilePath), jsonSettings);
        }