public static string GetDesignerFilePath( this string modelName, ModelOrTest modelOrTest, string directoryPath) { var className = modelName.GetFileNameWithoutExtension(modelOrTest); var result = Path.Combine(directoryPath, className + ".designer.cs"); return(result); }
public static string GetFileNameWithoutExtension( this string modelName, ModelOrTest modelOrTest) { modelName = modelName.Replace(" ", string.Empty); var result = modelOrTest == ModelOrTest.Model ? modelName : modelName + Settings.TestNameSuffix; return(result); }
public static string GetSpecifiedModelsDirectoryPath( this SpecifiedModelKind specifiedModelKind, SetterKind setterKind, ModelOrTest modelOrTest) { string result; switch (modelOrTest) { case ModelOrTest.Model: result = Settings.SpecifiedModelsPath + specifiedModelKind + "\\" + setterKind.BuildNameToken() + "\\"; break; case ModelOrTest.Test: result = Settings.SpecifiedModelsTestPath + specifiedModelKind + "\\" + setterKind.BuildNameToken() + "\\"; break; default: throw new NotSupportedException("This kind is not supported: " + modelOrTest); } return(result); }
public static string GetScriptedModelsDirectoryPath( this ModelOrTest modelOrTest, DeclaredKeyMethod declaredKeyMethod, SetterKind setterKind, TypeWrapperKind typeWrapperKind) { string result; switch (modelOrTest) { case ModelOrTest.Model: result = Settings.ScriptedModelsPath + declaredKeyMethod.BuildNameToken() + "\\" + setterKind.BuildNameToken() + "\\" + typeWrapperKind.BuildNameToken() + "\\"; break; case ModelOrTest.Test: result = Settings.ScriptedModelsTestsPath + declaredKeyMethod.BuildNameToken() + "\\" + setterKind.BuildNameToken() + "\\" + typeWrapperKind.BuildNameToken() + "\\"; break; default: throw new NotSupportedException("This model or test is not supported: " + modelOrTest); } return(result); }