예제 #1
0
        public void BBlocked_WhenDeleteValidated_ReturnsTrue()
        {
            //Arrange: An place is created
            BPlace place = new BPlace();

            //Act: the place is checked if it is update valid.
            bool valid = place.DeleteValid();

            //Assert: the place is valid for updating.
            Assert.AreEqual(true, valid);
        }
예제 #2
0
        public void BBlocked_WhenCheckedForEquivilance_AlwaysIsFalse()
        {
            //Arrange: An place is created
            BPlace place = new BPlace();

            //Act: the place is checked to be equivilant to itself.
            bool equals = false;// place.Equivilant(place);

            //Assert: the place is valid for updating.
            Assert.AreEqual(false, equals);
        }
예제 #3
0
        public void BPlaceWithValidMembers_WhenCreateValidated_ReturnsTrue()
        {
            //Arrange: An place with all valid members is created.
            BPlace place = new BPlace{
                Short_Name = "SA",
                Long_Name = "Long name"
            };

            //Act: the place is checked if it is create valid.
            bool valid = place.CreateValid();

            //Assert: the place is valid for creation.
            Assert.AreEqual(true, valid);
        }
예제 #4
0
        public void BPlaceWithInvalidMembers_WhenUpdateValidated_ReturnsFalse()
        {
            //Arrange: An place with all invalid members is created.
            BPlace place = new BPlace{
                Short_Name = "123",
                Long_Name = null
            };

            //Act: the place is checked if it is update valid.
            bool valid = place.UpdateValid();

            //Assert: the place is not valid for updating.
            Assert.AreEqual(false, valid);
        }