Beispiel #1
0
        public void AllRequiredTest()
        {
            Form target = new Form
            {
                Elements = new List <IElement>
                {
                    new Input("text", "Test1"),
                    new Input("text", "Test2"),
                    new Select("Test3")
                }
            };
            Form expected = target;

            foreach (var element in expected.Elements)
            {
                element.Classes.Add("required");
            }
            Form actual;

            actual = target.AllRequired();
            Assert.AreEqual(expected, actual);
        }
Beispiel #2
0
 public void AllRequiredTest()
 {
     Form target = new Form
     {
         Elements = new List<IElement>
         {
             new Input("text", "Test1"),
             new Input("text", "Test2"),
             new Select("Test3")
         }
     };
     Form expected = target;
     foreach (var element in expected.Elements)
     {
         element.Classes.Add("required");
     }
     Form actual;
     actual = target.AllRequired();
     Assert.AreEqual(expected, actual);
 }