public void WithName() { /* Given */ EnumDefinition original = @"enum ENUM { V1, V2 }"; /* When */ var modified = original .WithName("Renamed"); /* Then */ Assert.Equal("ENUM", original.Name); Assert.Equal("Renamed", modified.Name); }