Esempio n. 1
0
        public void PassNullToODataModelBuilderAddEnumTypeShouldThrowException()
        {
            // Arrange
            var builder = new ODataModelBuilder();

            // Act & Assert
            Assert.ThrowsArgumentNull(
                () => builder.AddEnumType(null),
                "type");
        }
Esempio n. 2
0
        public void PassNotEnumTypeToODataModelBuilderAddEnumTypeShouldThrowException()
        {
            // Arrange
            var  builder = new ODataModelBuilder();
            Type type    = typeof(Int32);

            // Act & Assert
            Assert.ThrowsArgument(
                () => builder.AddEnumType(type),
                "type",
                "The type 'System.Int32' cannot be configured as an enum type.");
        }