Example #1
0
        public void CanRename_should_throw_exception_if_name_are_the_same()
        {
            var command = new RenameAsset {
                FileName = "asset-name"
            };

            Assert.Throws <ValidationException>(() => GuardAsset.CanRename(command, "asset-name"));
        }
Example #2
0
        public void CanRename_not_should_throw_exception_if_name_are_different()
        {
            var command = new RenameAsset {
                FileName = "new-name"
            };

            GuardAsset.CanRename(command, "asset-name");
        }
Example #3
0
        public void CanDelete_should_not_throw_exception()
        {
            var command = new DeleteAsset();

            GuardAsset.CanDelete(command);
        }
Example #4
0
        public void CanRename_should_throw_exception_if_name_not_defined()
        {
            var command = new RenameAsset();

            Assert.Throws <ValidationException>(() => GuardAsset.CanRename(command, "asset-name"));
        }