Skip to content

Commit f366c99

Browse files
Fix import and test for Java(#252)
1 parent 2660b6d commit f366c99

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/GraphODataTemplateWriter/Extensions/OdcmModelExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public static string GetFullyQualifiedImportStatementForModel(this CustomT4Host
211211
// Form the import statement to disambiguate the model in the generated code file.
212212
var thisNamespace = host.CurrentModel.NamespaceName();
213213
var thisTypeName = (host.CurrentType as OdcmProperty).Type.Name.ToUpperFirstChar();
214-
importStatement = $"\nimport {thisNamespace}.models.generated.{thisTypeName};";
214+
importStatement = $"\nimport {thisNamespace}.models.extensions.{thisTypeName};";
215215
}
216216

217217
return importStatement;

test/Typewriter.Test/Given_a_valid_metadata_file_to_Typewriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public void It_generates_Java_models_with_disambiguated_import()
9797
// Check that the namespace applied at the CLI was added to the document.
9898
IEnumerable<string> lines = File.ReadLines(fileInfo.FullName);
9999
bool isExpectedImportStatementFound = false;
100-
string expected = "import com.microsoft.graph.models.generated.TimeOffRequest;";
100+
string expected = "import com.microsoft.graph.models.extensions.TimeOffRequest;";
101101
foreach (var line in lines)
102102
{
103103
if (line.Contains(expected))

0 commit comments

Comments
 (0)