Ejemplo n.º 1
0
    public void Multiple_Id_Properties_Returns_None_With_TooManyPropertiesWithAttributeMsg()
    {
        // Arrange
        var columns = MapF.GetColumns <FooTableWithMultipleIdAttributes, Foo>(new()).UnsafeUnwrap();

        // Act
        var result = MapF.GetColumnWithAttribute <FooTableWithMultipleIdAttributes, IdAttribute>(columns);

        // Assert
        result.AssertNone().AssertType <TooManyPropertiesWithAttributeMsg <FooTableWithMultipleIdAttributes, IdAttribute> >();
    }
Ejemplo n.º 2
0
    public void Missing_Id_Property_Attribute_Returns_None_With_NoPropertyWithAttributeMsg()
    {
        // Arrange
        var columns = MapF.GetColumns <FooTableWithoutIdAttribute, Foo>(new()).UnsafeUnwrap();

        // Act
        var result = MapF.GetColumnWithAttribute <FooTableWithoutIdAttribute, IdAttribute>(columns);

        // Assert
        result.AssertNone().AssertType <NoPropertyWithAttributeMsg <FooTableWithoutIdAttribute, IdAttribute> >();
    }