Exemple #1
0
    public void FactoryStrValues()
    {
        var color = SpanishColor.Factory("Black");

        Assert.Equal("0x000000", color.Content);

        color = SpanishColor.Factory("White");
        Assert.Equal("0xFFFFFF", color.Content);

        color = SpanishColor.Factory("Red");
        Assert.Equal("0xFF0000", color.Content);

        color = SpanishColor.Factory("Green");
        Assert.Equal("0x00FF00", color.Content);

        color = SpanishColor.Factory("Blue");
        Assert.Equal("0x0000FF", color.Content);
    }
Exemple #2
0
    public void FactoryStr()
    {
        var color = SpanishColor.Factory("Black");

        Assert.NotNull(color as ColorNegro);

        color = SpanishColor.Factory("White");
        Assert.NotNull(color as ColorBlanco);

        color = SpanishColor.Factory("Red");
        Assert.NotNull(color as ColorRojo);

        color = SpanishColor.Factory("Green");
        Assert.NotNull(color as ColorVerde);

        color = SpanishColor.Factory("Blue");
        Assert.NotNull(color as ColorAzul);
    }