Wednesday, November 16, 2011

appending a custom attribute

Appending a custom attribute in our app via a data test...

ProgramPlan alpha = new ProgramPlan { CanOrder = true };

alpha.Save();

alpha.NameStaticAttribute.CreateAndAddAvailableValue("Alpha")

   .SelectValueForEntity(alpha.Id);

alpha.Save();

 
 

It's not trivial. Craig had to show me how it's done. The work above, should allow for this to return true however:

Assert.AreEqual("Alpha",

   alpha.NameStaticAttribute.GetSelectedValueWithDefault(alpha.Id).Value);

No comments:

Post a Comment