public void Set_Int__SetsCorrectValue() { const int testValue = 123; testObj.Set(ParamName, testValue); testObj.Get(ParamName).As <int>().ShouldBe(testValue); }
public static void Set(this MOParams moParams, string paramName, int paramValue) { moParams.Set(paramName, new MOParamInt() { Name = paramName, Value = paramValue }); }
public static void Set(this MOParams moParams, string paramName, double paramValue) { moParams.Set(paramName, new MOParamDouble() { Name = paramName, Value = paramValue }); }
public void UpdateValue__GetsCorrectValue() { MOParams testObj = new MOParams(); const int val1 = 123; const int val2 = 987; testObj.Set("test", new MOParamInt() { Value = val1 }); testObj.Get("test").As <int>().ShouldBe(val1); testObj.Set("test", new MOParamInt() { Value = val2 }); testObj.Get("test").As <int>().ShouldBe(val2); }
public void Set_TwoDifferentParams__GetsCorrectValues() { MOParams testObj = new MOParams(); const int val1 = 123; const int val2 = 987; testObj.Set("param1", new MOParamInt() { Value = val1 }); testObj.Set("param2", new MOParamInt() { Value = val2 }); testObj.Get("param1").As <int>().ShouldBe(val1); testObj.Get("param2").As <int>().ShouldBe(val2); }
public void Set_String__GetsCorrectValue() { MOParams testObj = new MOParams(); const string testValue = "abcdefkgofdsa dfgsdfg"; testObj.Set("test", new MOParamString() { Value = testValue }); testObj.Get("test").As <string>().ShouldBe(testValue); }
public void Set_Double__GetsCorrectValue() { MOParams testObj = new MOParams(); const double testValue = 123.123; testObj.Set("test", new MOParamDouble() { Value = testValue }); testObj.Get("test").As <double>().ShouldBe(testValue); }
public void Set_Float__GetsCorrectValue() { MOParams testObj = new MOParams(); const float testValue = 123.123f; testObj.Set("test", new MOParamFloat() { Value = testValue }); testObj.Get("test").As <float>().ShouldBe(testValue); }
public void Set_Int__GetsCorrectValue() { MOParams testObj = new MOParams(); const int testValue = 123; testObj.Set("test", new MOParamInt() { Value = testValue }); testObj.Get("test").As <int>().ShouldBe(testValue); }