コード例 #1
0
ファイル: tBShape.cs プロジェクト: j-burrows/drawing-lib
        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);
        }
コード例 #2
0
ファイル: tBShape.cs プロジェクト: j-burrows/drawing-lib
        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);
        }