예제 #1
0
    public void FactoryIntValues()
    {
        SomeColor mycolor = null;

        mycolor = SomeColor.Factory(0x000000);
        Assert.Equal("0x000000", mycolor.Content);

        mycolor = SomeColor.Factory(0xFFFFFF);
        Assert.Equal("0xFFFFFF", mycolor.Content);

        mycolor = SomeColor.Factory(0xFF0000);
        Assert.Equal("0xFF0000", mycolor.Content);

        mycolor = SomeColor.Factory(0x00FF00);
        Assert.Equal("0x00FF00", mycolor.Content);

        mycolor = SomeColor.Factory(0x0000FF);
        Assert.Equal("0x0000FF", mycolor.Content);
    }
예제 #2
0
    public void FactoryInt()
    {
        SomeColor mycolor = null;

        mycolor = SomeColor.Factory(0x000000);
        Assert.NotNull(mycolor as SomeColorBlack);

        mycolor = SomeColor.Factory(0xffffff);
        Assert.NotNull(mycolor as SomeColorWhite);

        mycolor = SomeColor.Factory(0xff0000);
        Assert.NotNull(mycolor as SomeColorRed);

        mycolor = SomeColor.Factory(0x00ff00);
        Assert.NotNull(mycolor as SomeColorGreen);

        mycolor = SomeColor.Factory(0x0000ff);
        Assert.NotNull(mycolor as SomeColorBlue);
    }