Ejemplo n.º 1
0
        public void Validate_AtLeastOneBlock_Fail_ReturnsListWithCorrectError()
        {
            // Arrange

            var script = new ItemFilterScript();

            // Act
            var result = script.Validate();

            // Assert
            Assert.AreEqual(1, result.Count(r => r.Contains("A script must have at least one block")));
        }
Ejemplo n.º 2
0
        public void Validate_AtLeastOneBlock_Pass_ReturnsListWithoutError()
        {
            // Arrange

            var script = new ItemFilterScript();

            script.ItemFilterBlocks.Add(new ItemFilterBlock());

            // Act
            var result = script.Validate();

            // Assert
            Assert.AreEqual(0, result.Count(r => r.Contains("A script must have at least one block")));
        }
Ejemplo n.º 3
0
        public void Validate_AtLeastOneBlock_Fail_ReturnsListWithCorrectError()
        {
            // Arrange

            var script = new ItemFilterScript();

            // Act
            var result = script.Validate();

            // Assert
            Assert.AreEqual(1, result.Count(r => r.Contains("A script must have at least one block")));
        }
Ejemplo n.º 4
0
        public void Validate_AtLeastOneBlock_Pass_ReturnsListWithoutError()
        {
            // Arrange

            var script = new ItemFilterScript();
            script.ItemFilterBlocks.Add(new ItemFilterBlock());

            // Act
            var result = script.Validate();

            // Assert
            Assert.AreEqual(0, result.Count(r => r.Contains("A script must have at least one block")));
        }