public virtual void ViewModelRestoresRootGivenKey() { var foo1key = foo1.GetPropertyByName("Id").Title; ITestObject view1 = views.GetAction("New View Foo").InvokeReturnObject(foo1key); ITestProperty root = view1.GetPropertyByName("Root"); root.AssertTitleIsEqual("Foo1"); }
public virtual void CMaskOnDecimalProperty() { obj = NewTestObject<Object2>(); prop1 = obj.GetPropertyByName("Prop1"); prop1.SetValue("32.70"); var dom = (Object2) obj.GetDomainObject(); StringAssert.Equals("32.7", dom.Prop1.ToString()); StringAssert.Equals("32.70", prop1.Content.Title); StringAssert.Equals("£32.70", prop1.Title); prop1.AssertTitleIsEqual("£32.70"); prop1.AssertValueIsEqual("32.70"); }
public virtual void TestPropertyValue() { ITestObject obj = NewTestObject <Object1>(); obj.GetPropertyById("Prop3").SetValue("16/08/2013"); ITestProperty p1 = obj.GetPropertyById("Prop3"); p1.AssertValueIsEqual("16/08/2013 00:00:00"); p1.AssertTitleIsEqual("16/08/2013"); }
public virtual void DMaskOnDateProperty() { obj = NewTestObject<Object1>(); prop1 = obj.GetPropertyByName("Prop1"); prop1.SetValue("23/09/2009 11:34:50"); prop2 = obj.GetPropertyByName("Prop2"); prop2.SetValue("23/09/2009 11:34:50"); var dom = (Object1) obj.GetDomainObject(); StringAssert.Equals("23/09/2009 11:34:50", dom.Prop1.ToString()); StringAssert.Equals("23/09/2009 11:34:50", prop1.Content.Title); StringAssert.Equals("23/09/2009 11:34:50", dom.Prop2.ToString()); StringAssert.Equals("23/09/2009", prop2.Content.Title); prop1.AssertTitleIsEqual("23/09/2009 11:34:50"); prop1.AssertValueIsEqual("23/09/2009 11:34:50"); prop2.AssertTitleIsEqual("23/09/2009"); prop2.AssertValueIsEqual("23/09/2009 11:34:50"); }
public virtual void TestPropertyValue() { var culture = Thread.CurrentThread.CurrentCulture; try { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; ITestObject obj = NewTestObject <Object1>(); obj.GetPropertyById("Prop3").SetValue("08/16/2013"); ITestProperty p1 = obj.GetPropertyById("Prop3"); p1.AssertValueIsEqual("08/16/2013 00:00:00"); p1.AssertTitleIsEqual("08/16/2013"); } finally { Thread.CurrentThread.CurrentCulture = culture; } }