public void GetReturnOptionObject_OptionObject2_Null()
        {
            OptionObject2 nullOptionObject   = null;
            OptionObject2 returnOptionObject = (OptionObject2)OptionObjectHelpers.GetReturnOptionObject((IOptionObject2)nullOptionObject);

            Assert.AreNotEqual("3", returnOptionObject.ErrorCode);
        }
        public void GetReturnOptionObject_OptionObject2015_Null()
        {
            OptionObject2015 nullOptionObject   = null;
            OptionObject2015 returnOptionObject = (OptionObject2015)OptionObjectHelpers.GetReturnOptionObject(nullOptionObject);

            Assert.AreNotEqual("3", returnOptionObject.ErrorCode);
        }
        public void GetReturnOptionObject_ErrorMessage_AreEqual()
        {
            string       expected           = "Hello World!";
            OptionObject returnOptionObject = (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)optionObject, 1, expected);

            Assert.AreEqual(expected, returnOptionObject.ErrorMesg);
        }
        public void GetReturnOptionObject_ErrorCode_Negative1_Error()
        {
            int          expected           = -1;
            OptionObject returnOptionObject = (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)optionObject, expected, "test");

            Assert.AreNotEqual(expected, returnOptionObject.ErrorCode);
        }
        public void GetReturnOptionObject_ErrorCode_6_InvalidOpenFormString()
        {
            int          expected           = 6;
            OptionObject returnOptionObject = (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)optionObject, expected, "test");

            Assert.AreEqual(expected, returnOptionObject.ErrorCode);
        }
        public void GetReturnOptionObject_ErrorCode_6_AreEqual()
        {
            int          expected           = 6;
            OptionObject returnOptionObject = (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)optionObject, expected, "[PM]GUISYS560");

            Assert.AreEqual(expected, returnOptionObject.ErrorCode);
        }
        public void GetReturnOptionObject_ErrorCode_5_InvalidURL()
        {
            int          expected           = 5;
            OptionObject returnOptionObject = (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)optionObject, expected, "test");

            Assert.AreEqual(expected, returnOptionObject.ErrorCode);
        }
        public void GetReturnOptionObject_ErrorCode_5_AreEqual()
        {
            int          expected           = 5;
            OptionObject returnOptionObject = (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)optionObject, expected, "http://www.rcskids.org");

            Assert.AreEqual(expected, returnOptionObject.ErrorCode);
        }
Ejemplo n.º 9
0
 /// <summary>
 /// Creates an <see cref="OptionObject2015"/> with the minimal information required to return.
 /// </summary>
 /// <returns></returns>
 public new OptionObject2015 ToReturnOptionObject() => (OptionObject2015)OptionObjectHelpers.GetReturnOptionObject(this);
        public void GetReturnOptionObject_SystemCode_AreEqual()
        {
            OptionObject returnOptionObject = (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)optionObject);

            Assert.AreEqual(optionObject.SystemCode, returnOptionObject.SystemCode);
        }
        public void GetReturnOptionObject_OptionUserId_AreEqual()
        {
            OptionObject returnOptionObject = (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)optionObject);

            Assert.AreEqual(optionObject.OptionUserId, returnOptionObject.OptionUserId);
        }
        public void GetReturnOptionObject_Facility_AreEqual()
        {
            OptionObject returnOptionObject = (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)optionObject);

            Assert.AreEqual(optionObject.Facility, returnOptionObject.Facility);
        }
        public void GetReturnOptionObject_EpisodeNumber_AreEqual()
        {
            OptionObject returnOptionObject = (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)optionObject);

            Assert.AreEqual(optionObject.EpisodeNumber, returnOptionObject.EpisodeNumber);
        }
        public void GetReturnOptionObject_EntityID_AreEqual()
        {
            OptionObject returnOptionObject = (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)optionObject);

            Assert.AreEqual(optionObject.EntityID, returnOptionObject.EntityID);
        }
 /// <summary>
 /// Creates an <see cref="OptionObjectBase"/> with the minimal information required to return plus the provide Error Code and Message.
 /// </summary>
 /// <param name="errorCode"></param>
 /// <param name="errorMessage"></param>
 /// <returns></returns>
 public OptionObjectBase ToReturnOptionObject(double errorCode, string errorMessage) => (OptionObjectBase)OptionObjectHelpers.GetReturnOptionObject(_optionObject, errorCode, errorMessage);
 /// <summary>
 /// Creates an <see cref="OptionObject"/> with the minimal information required to return.
 /// </summary>
 /// <returns></returns>
 public new OptionObject ToReturnOptionObject() => (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)this);
        public void GetReturnOptionObject_ErrorCode_Default_AreEqual()
        {
            OptionObject returnOptionObject = (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)optionObject);

            Assert.AreEqual(0, returnOptionObject.ErrorCode);
        }
 /// <summary>
 /// Creates an <see cref="OptionObject"/> with the minimal information required to return plus the provide Error Code and Message.
 /// </summary>
 /// <param name="errorCode"></param>
 /// <param name="errorMessage"></param>
 /// <returns></returns>
 public new OptionObject ToReturnOptionObject(double errorCode, string errorMessage) => (OptionObject)OptionObjectHelpers.GetReturnOptionObject((IOptionObject)this, errorCode, errorMessage);
 /// <summary>
 /// Creates an <see cref="OptionObjectBase"/> with the minimal information required to return.
 /// </summary>
 /// <returns></returns>
 public OptionObjectBase ToReturnOptionObject() => (OptionObjectBase)OptionObjectHelpers.GetReturnOptionObject(_optionObject);