public void BShapeWithValidMembers_WhenCheckedIfUpdateValid_IsTrue() { //Arrange: A entry with valid members is constructed. BShape shape = new BShape { Json = "" }; //Act: the shape is checked to be update valid. bool valid = shape.UpdateValid(); //Assert: the shape is update valid. Assert.AreEqual(true, valid); }
public void BShapeWithInvalidMembers_WhenCheckedIfUpdateValid_IsFalse() { //Arrange: A entry with invalid members is constructed. StringBuilder builder = new StringBuilder(); for (int i = 0; i < 4097; i++ ) { builder.Append("1"); } BShape shape = new BShape { Json = builder.ToString()}; //Act: the shape is checked to be update valid. bool valid = shape.UpdateValid(); //Assert: the shape is update valid. Assert.AreEqual(false, valid); }