Beispiel #1
0
        public async Task <JsonBuild> GetBuild(string project, int buildId)
        {
            StructuredHttpExchange exchange = StructuredHttpExchange.Get(BuildRestCalls.Build);

            exchange.SetRoute("{buildId}", buildId);
            JsonBuild result = await ProcessProjectRequest(project, exchange, JsonBuild.FromToken);

            return(result);
        }
        internal static JsonBuild GetInstance([CallerMemberName] string callerName = "")
        {
            JToken json = new JObject();

            JsonSource(ref json);
            JsonBuild instance = JsonBuild.FromToken(json);

            InstanceFactory(ref instance, callerName);
            return(instance);
        }
 public void Drop_UnitTest()
 {
     ExecuteProperty(
         () =>
         // Create Test Instance
     {
         JsonBuild instance = GetInstance();
         return(instance);
     },
         null, null, null, // No Set Accessor
         // Invoke Getter
         instance => { return(instance.Drop); },
         // Validate Get Operation
         (instance, setValue, getValue) => { });
 }
        public void FromToken_UnitTest()
        {
            JToken    token   = default(JToken);
            JsonBuild _retVal = default(JsonBuild);

            ExecuteMethod(
                () => { return(GetInstance()); },
                instance =>
            {
                token = default(JToken);     //No Constructor
                FromToken_PreCondition(instance, ref token);
            },
                instance => { return(_retVal = JsonBuild.FromToken(token)); },
                instance => { FromToken_PostValidate(instance, token, _retVal); });
        }
 partial void Requests_SetCondition(ref JsonBuild instance, ref Int32 setValue);
 partial void LastChangedBy_SetCondition(ref JsonBuild instance, ref String setValue);
 partial void JsonValue_SetCondition(ref JsonBuild instance, ref JToken setValue);
 partial void CaptureJson_PreCondition(JsonBuild instance, ref JToken token);
 partial void Url_SetCondition(ref JsonBuild instance, ref Int32 setValue);
 partial void ToString_PreCondition(JsonBuild instance);
 partial void StartTime_SetCondition(ref JsonBuild instance, ref DateTime setValue);
 partial void BuildNumber_SetCondition(ref JsonBuild instance, ref Int32 setValue);
 partial void GetHashCode_PreCondition(JsonBuild instance);
 partial void GetHashCode_PostValidate(JsonBuild instance, Int32 _retVal);
 partial void FromToken_PreCondition(JsonBuild instance, ref JToken token);
 partial void FromToken_PostValidate(JsonBuild instance, JToken token, JsonBuild _retVal);
 partial void Equals_PreCondition(JsonBuild instance, ref Object obj);
 partial void Equals_PostValidate(JsonBuild instance, Object obj, Boolean _retVal);
 partial void RetainIndefinitely_SetCondition(ref JsonBuild instance, ref Boolean setValue);
 partial void SourceGetVersion_SetCondition(ref JsonBuild instance, ref Int32 setValue);
 partial void GetType_PostValidate(JsonBuild instance, Type _retVal);
 partial void ToString_PostValidate(JsonBuild instance, String _retVal);
 partial void HasDiagnostics_SetCondition(ref JsonBuild instance, ref Boolean setValue);
 partial void Uri_SetCondition(ref JsonBuild instance, ref String setValue);
 static partial void InstanceFactory(ref JsonBuild instance, [CallerMemberName] string callerName = "");
 partial void GetType_PreCondition(JsonBuild instance);
 partial void CaptureJson_PostValidate(JsonBuild instance, JToken token);