@@ -15,50 +15,6 @@ public class Project
1515 {
1616 public static string TypeName = "project" ;
1717
18- public static readonly Project Instance = new Project
19- {
20- Name = Projects . First ( ) . Name ,
21- LeadDeveloper = new Developer ( ) { FirstName = "Martijn" , LastName = "Laarman" } ,
22- StartedOn = new DateTime ( 2015 , 1 , 1 ) ,
23- DateString = new DateTime ( 2015 , 1 , 1 ) . ToString ( "yyyy-MM-ddTHH\\ :mm\\ :ss.fffffffzzz" ) ,
24- Location = new SimpleGeoPoint { Lat = 42.1523 , Lon = - 80.321 } ,
25- SourceOnly = TestConfiguration . Instance . Random . SourceSerializer ? new SourceOnlyObject ( ) : null
26- } ;
27-
28- public static readonly string Routing = Instance . Name ;
29-
30- private static readonly object InstanceAnonymousDefault = new
31- {
32- name = Projects . First ( ) . Name ,
33- type = TypeName ,
34- join = Instance . Join . ToAnonymousObject ( ) ,
35- state = "BellyUp" ,
36- visibility = "Public" ,
37- startedOn = "2015-01-01T00:00:00" ,
38- lastActivity = "0001-01-01T00:00:00" ,
39- numberOfContributors = 0 ,
40- dateString = new DateTime ( 2015 , 1 , 1 ) . ToString ( "yyyy-MM-ddTHH\\ :mm\\ :ss.fffffffzzz" ) ,
41- leadDeveloper = new { gender = "Male" , id = 0 , firstName = "Martijn" , lastName = "Laarman" } ,
42- location = new { lat = Instance . Location . Lat , lon = Instance . Location . Lon }
43- } ;
44-
45- private static readonly object InstanceAnonymousSourceSerializer = new
46- {
47- name = Projects . First ( ) . Name ,
48- type = TypeName ,
49- join = Instance . Join . ToAnonymousObject ( ) ,
50- state = "BellyUp" ,
51- visibility = "Public" ,
52- startedOn = "2015-01-01T00:00:00" ,
53- lastActivity = "0001-01-01T00:00:00" ,
54- numberOfContributors = 0 ,
55- dateString = new DateTime ( 2015 , 1 , 1 ) . ToString ( "yyyy-MM-ddTHH\\ :mm\\ :ss.fffffffzzz" ) ,
56- leadDeveloper = new { gender = "Male" , id = 0 , firstName = "Martijn" , lastName = "Laarman" } ,
57- location = new { lat = Instance . Location . Lat , lon = Instance . Location . Lon } ,
58- sourceOnly = new { notWrittenByDefaultSerializer = "written" }
59- } ;
60-
61-
6218 public IEnumerable < string > Branches { get ; set ; }
6319 public IList < Tag > CuratedTags { get ; set ; }
6420 public string DateString { get ; set ; }
@@ -121,8 +77,55 @@ [StringEnum] [JsonConverter(typeof(StringEnumConverter))]
12177 { "color" , new [ ] { "red" , "blue" , "green" , "violet" , "yellow" } . Take ( Gimme . Random . Number ( 1 , 4 ) ) }
12278 }
12379 } ) ;
80+
12481 public static IList < Project > Projects { get ; } = Generator . Clone ( ) . Generate ( 100 ) ;
82+
12583 public static Project First { get ; } = Projects . First ( ) ;
84+
85+ public static readonly Project Instance = new Project
86+ {
87+ Name = Projects . First ( ) . Name ,
88+ LeadDeveloper = new Developer ( ) { FirstName = "Martijn" , LastName = "Laarman" } ,
89+ StartedOn = new DateTime ( 2015 , 1 , 1 ) ,
90+ DateString = new DateTime ( 2015 , 1 , 1 ) . ToString ( "yyyy-MM-ddTHH\\ :mm\\ :ss.fffffffzzz" ) ,
91+ Location = new SimpleGeoPoint { Lat = 42.1523 , Lon = - 80.321 } ,
92+ SourceOnly = TestConfiguration . Instance . Random . SourceSerializer ? new SourceOnlyObject ( ) : null
93+ } ;
94+
95+ public static readonly string Routing = Instance . Name ;
96+
97+ private static readonly object InstanceAnonymousDefault = new
98+ {
99+ name = Projects . First ( ) . Name ,
100+ type = TypeName ,
101+ join = Instance . Join . ToAnonymousObject ( ) ,
102+ state = "BellyUp" ,
103+ visibility = "Public" ,
104+ startedOn = "2015-01-01T00:00:00" ,
105+ lastActivity = "0001-01-01T00:00:00" ,
106+ numberOfContributors = 0 ,
107+ dateString = new DateTime ( 2015 , 1 , 1 ) . ToString ( "yyyy-MM-ddTHH\\ :mm\\ :ss.fffffffzzz" ) ,
108+ leadDeveloper = new { gender = "Male" , id = 0 , firstName = "Martijn" , lastName = "Laarman" } ,
109+ location = new { lat = Instance . Location . Lat , lon = Instance . Location . Lon }
110+ } ;
111+
112+ private static readonly object InstanceAnonymousSourceSerializer = new
113+ {
114+ name = Projects . First ( ) . Name ,
115+ type = TypeName ,
116+ join = Instance . Join . ToAnonymousObject ( ) ,
117+ state = "BellyUp" ,
118+ visibility = "Public" ,
119+ startedOn = "2015-01-01T00:00:00" ,
120+ lastActivity = "0001-01-01T00:00:00" ,
121+ numberOfContributors = 0 ,
122+ dateString = new DateTime ( 2015 , 1 , 1 ) . ToString ( "yyyy-MM-ddTHH\\ :mm\\ :ss.fffffffzzz" ) ,
123+ leadDeveloper = new { gender = "Male" , id = 0 , firstName = "Martijn" , lastName = "Laarman" } ,
124+ location = new { lat = Instance . Location . Lat , lon = Instance . Location . Lon } ,
125+ sourceOnly = new { notWrittenByDefaultSerializer = "written" }
126+ } ;
127+
128+
126129 // @formatter:on — enable formatter after this line
127130 }
128131
0 commit comments