Ejemplo n.º 1
0
 public void DPageAndBPageWithMatchingKeys_AreNotEquivilant()
 {
     DPage first = new DPage { key = 1 };
     BPage second = new BPage { Page_ID = 2 };
     bool equivilant = first.Equivilant(second);
     Assert.IsFalse(equivilant);
 }
Ejemplo n.º 2
0
 public void BPageWithInvalidName_IsNotCreateValid()
 {
     BPage invalid = new BPage {
         Name = null,
         Title = "Valid",
         Icon_Url = "Valid",
         Url = "Valid"
     };
     Assert.IsFalse(invalid.CreateValid());
 }
Ejemplo n.º 3
0
 public void BPageWithInvalidName_IsNotUpdateValid()
 {
     //Name is assigned a string of length 17
     BPage valid = new BPage {
         Name = "12345678901234567",
         Title = "Valid",
         Icon_Url = "Valid",
         Url = "Valid"
     };
     Assert.IsFalse(valid.UpdateValid());
 }
Ejemplo n.º 4
0
 public void BPageWithInvalidIconUrl_IsNotCreateValid()
 {
     //Title is made 1100 characters long (over 1024 max).
     BPage invalid = new BPage {
         Name = "Valid",
         Title = @"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890",
         Icon_Url = "Valid",
         Url = "Valid"
     };
     Assert.IsFalse(invalid.CreateValid());
 }
Ejemplo n.º 5
0
 public void BPageWithInvalidTitle_IsNotCreateValid()
 {
     BPage invalid = new BPage {
         Name = "Valid",
         Title = "1234567890123456789012345678901234567890",
         Icon_Url = "Valid",
         Url = "Valid"
     };
     Assert.IsFalse(invalid.CreateValid());
 }
Ejemplo n.º 6
0
 public void BPageWithValidMembers_IsUpdateValid()
 {
     BPage valid = new BPage {
         Name = "Valid",
         Title = "Valid",
         Icon_Url = "Valid",
         Url = "Valid"
     };
     Assert.IsTrue(valid.UpdateValid());
 }
Ejemplo n.º 7
0
 public void BPageWithNullMembers_IsUpdateValid()
 {
     BPage valid = new BPage {
         Name = null,
         Title = null,
         Icon_Url = null,
         Url = null
     };
     Assert.IsTrue(valid.UpdateValid());
 }
Ejemplo n.º 8
0
 public void BPageWithInvalidUrl_IsNotUpdateValid()
 {
     //Icon Url is assigned a string of length 1100
     BPage valid = new BPage {
         Name = "Valid",
         Title = "Valid",
         Icon_Url = "Valid",
         Url = @"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                   1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
     };
     Assert.IsFalse(valid.UpdateValid());
 }