Ejemplo n.º 1
0
        public void Should_ReturnCorrectTransformation(Transformation transformation, Type expectedType)
        {
            //Arrange
            var sut = new TransformationFactory();

            //Act
            var createdTransformation = sut.Create(transformation);

            //Assert
            createdTransformation.Should().BeOfType(expectedType);
        }
Ejemplo n.º 2
0
        public void Should_ThrowException_If_InvalidTransformation()
        {
            //Arrange
            const Transformation invalidTransformation = (Transformation)Int32.MaxValue;
            var sut = new TransformationFactory();

            //Act
            Func <ITransformation> act = () => sut.Create(invalidTransformation);

            //Assert
            act.Should().Throw <ArgumentOutOfRangeException>();
        }