public void MapEnumType_should_create_enum_type_with_clr_type_name_and_add_to_model() { var model = new EdmModel().Initialize(); var mockType = new MockType("Foo"); mockType.SetupGet(t => t.IsEnum).Returns(true); mockType.Setup(t => t.GetEnumUnderlyingType()).Returns(typeof(int)); mockType.Setup(t => t.GetEnumNames()).Returns(new string[] { }); mockType.Setup(t => t.GetEnumValues()).Returns(new int[] { }); var modelConfiguration = new ModelConfiguration(); var typeMapper = new TypeMapper(new MappingContext(modelConfiguration, new ConventionsConfiguration(), model)); var enumType = typeMapper.MapEnumType(mockType); Assert.NotNull(enumType); Assert.Same(enumType, model.GetEnumType("Foo")); }