# Copyright:: Copyright 2012 Trimble Navigation Ltd.
# License:: Apache License version 2.0
# Original Author:: Scott Lininger 
#
# Tests the SketchUp Ruby API Color object.
#
# This file was originally generated by ourdoc.rb, an internal tool we developed
# specifically for outputting support files (documentation, unit tests, etc.)
# from the standard, doxygen-style c++ comments that are embedded into the
# Ruby implementation files. You can find ourdoc.rb alongside these
# implementation files at:
#
# googleclient/sketchup/source/sketchup/ruby
#

require 'test/unit'

# TC_Color contains unit tests for the Color class.
#
# API Object::       Color
# C++ File::         rcolor.cpp
# Parent Class::     Object
# Version::          SketchUp 6.0
#
# The Color class is used to create and manipulate colors within SketchUp
# models.
#
# For methods that accept a Color object, such as the
# face.material method, you can pass in an actual Color object, or an object
# that can be converted to a Color. For example:
#
#     face.material = Sketchup::Color.new(255, 0, 0)
#     face.material = 255
#     face.material = 0xff
#     face.material = "red"
#     face.material = "#ff0000"
#     face.material = [1.0, 0.0, 0.0]
#     face.material = [255, 0, 0]
#
# SketchUp ships with several built in colors in the Materials Browser.
# These colors are listed in the following table.
#
# <table>
# <tr><td>Name</td><td>RGB Values</td><td>Swatch</td></tr>
# <tr><td>AliceBlue</td><td>240,248,255</td>
# <td style="background-color:rgb(240,248,255)">&nbsp;</td></tr>
# <tr><td>AntiqueWhite</td><td>250,235,215</td>
# <td style="background-color:rgb(250,235,215)">&nbsp;</td></tr>
# <tr><td>Aqua</td><td>0,255,255</td>
# <td style="background-color:rgb(0,255,255)">&nbsp;</td></tr>
# <tr><td>Aquamarine</td><td>127,255,212</td>
# <td style="background-color:rgb(127,255,212)">&nbsp;</td></tr>
# <tr><td>Azure</td><td>240,255,255</td>
# <td style="background-color:rgb(240,255,255)">&nbsp;</td></tr>
# <tr><td>Beige</td><td>245,245,220</td>
# <td style="background-color:rgb(245,245,220)">&nbsp;</td></tr>
# <tr><td>Bisque</td><td>255,228,196</td>
# <td style="background-color:rgb(255,228,196)">&nbsp;</td></tr>
# <tr><td>Black</td><td>0,0,0</td>
# <td style="background-color:rgb(0,0,0)">&nbsp;</td></tr>
# <tr><td>BlanchedAlmond</td><td>255,235,205</td>
# <td style="background-color:rgb(255,235,205)">&nbsp;</td></tr>
# <tr><td>Blue</td><td>0,0,255</td>
# <td style="background-color:rgb(0,0,255)">&nbsp;</td></tr>
# <tr><td>BlueViolet</td><td>138,43,226</td>
# <td style="background-color:rgb(138,43,226)">&nbsp;</td></tr>
# <tr><td>Brown</td><td>165,42,42</td>
# <td style="background-color:rgb(165,42,42)">&nbsp;</td></tr>
# <tr><td>BurlyWood</td><td>222,184,135</td>
# <td style="background-color:rgb(222,184,135)">&nbsp;</td></tr>
# <tr><td>CadetBlue</td><td>95,158,160</td>
# <td style="background-color:rgb(95,158,160)">&nbsp;</td></tr>
# <tr><td>Chartreuse</td><td>127,255,0</td>
# <td style="background-color:rgb(127,255,0)">&nbsp;</td></tr>
# <tr><td>Chocolate</td><td>210,105,30</td>
# <td style="background-color:rgb(210,105,30)">&nbsp;</td></tr>
# <tr><td>Coral</td><td>255,127,80</td>
# <td style="background-color:rgb(255,127,80)">&nbsp;</td></tr>
# <tr><td>CornflowerBlue</td><td>100,149,237</td>
# <td style="background-color:rgb(100,149,237)">&nbsp;</td></tr>
# <tr><td>Cornsilk</td><td>255,248,220</td>
# <td style="background-color:rgb(255,248,220)">&nbsp;</td></tr>
# <tr><td>Crimson</td><td>220,20,60</td>
# <td style="background-color:rgb(220,20,60)">&nbsp;</td></tr>
# <tr><td>Cyan</td><td>0,255,255</td>
# <td style="background-color:rgb(0,255,255)">&nbsp;</td></tr>
# <tr><td>DarkBlue</td><td>0,0,139</td>
# <td style="background-color:rgb(0,0,139)">&nbsp;</td></tr>
# <tr><td>DarkCyan</td><td>0,139,139</td>
# <td style="background-color:rgb(0,139,139)">&nbsp;</td></tr>
# <tr><td>DarkGoldenrod</td><td>184,134,11</td>
# <td style="background-color:rgb(184,134,11)">&nbsp;</td></tr>
# <tr><td>DarkGray</td><td>169,169,169</td>
# <td style="background-color:rgb(169,169,169)">&nbsp;</td></tr>
# <tr><td>DarkGreen</td><td>0,100,0</td>
# <td style="background-color:rgb(0,100,0)">&nbsp;</td></tr>
# <tr><td>DarkKhaki</td><td>189,183,107</td>
# <td style="background-color:rgb(189,183,107)">&nbsp;</td></tr>
# <tr><td>DarkMagenta</td><td>139,0,139</td>
# <td style="background-color:rgb(139,0,139)">&nbsp;</td></tr>
# <tr><td>DarkOliveGreen</td><td>85,107,47</td>
# <td style="background-color:rgb(85,107,47)">&nbsp;</td></tr>
# <tr><td>DarkOrange</td><td>255,140,0</td>
# <td style="background-color:rgb(255,140,0)">&nbsp;</td></tr>
# <tr><td>DarkOrchid</td><td>153,50,204</td>
# <td style="background-color:rgb(153,50,204)">&nbsp;</td></tr>
# <tr><td>DarkRed</td><td>139,0,0</td>
# <td style="background-color:rgb(139,0,0)">&nbsp;</td></tr>
# <tr><td>DarkSalmon</td><td>233,150,122</td>
# <td style="background-color:rgb(233,150,122)">&nbsp;</td></tr>
# <tr><td>DarkSeaGreen</td><td>143,188,143</td>
# <td style="background-color:rgb(143,188,143)">&nbsp;</td></tr>
# <tr><td>DarkSlateBlue</td><td>72,61,139</td>
# <td style="background-color:rgb(72,61,139)">&nbsp;</td></tr>
# <tr><td>DarkSlateGray</td><td>47,79,79</td>
# <td style="background-color:rgb(47,79,79)">&nbsp;</td></tr>
# <tr><td>DarkTurquoise</td><td>0,206,209</td>
# <td style="background-color:rgb(0,206,209)">&nbsp;</td></tr>
# <tr><td>DarkViolet</td><td>148,0,211</td>
# <td style="background-color:rgb(148,0,211)">&nbsp;</td></tr>
# <tr><td>DeepPink</td><td>255,20,147</td>
# <td style="background-color:rgb(255,20,147)">&nbsp;</td></tr>
# <tr><td>DeepSkyBlue</td><td>0,191,255</td>
# <td style="background-color:rgb(0,191,255)">&nbsp;</td></tr>
# <tr><td>DimGray</td><td>105,105,105</td>
# <td style="background-color:rgb(105,105,105)">&nbsp;</td></tr>
# <tr><td>DodgerBlue</td><td>30,144,255</td>
# <td style="background-color:rgb(30,144,255)">&nbsp;</td></tr>
# <tr><td>FireBrick</td><td>178,34,34</td>
# <td style="background-color:rgb(178,34,34)">&nbsp;</td></tr>
# <tr><td>FloralWhite</td><td>255,250,240</td>
# <td style="background-color:rgb(255,250,240)">&nbsp;</td></tr>
# <tr><td>ForestGreen</td><td>34,139,34</td>
# <td style="background-color:rgb(34,139,34)">&nbsp;</td></tr>
# <tr><td>Fuchsia</td><td>255,0,255</td>
# <td style="background-color:rgb(255,0,255)">&nbsp;</td></tr>
# <tr><td>Gainsboro</td><td>220,220,220,</td>
# <td style="background-color:rgb(220,220,220,)">&nbsp;</td></tr>
# <tr><td>GhostWhite</td><td>248,248,255</td>
# <td style="background-color:rgb(248,248,255)">&nbsp;</td></tr>
# <tr><td>Gold</td><td>255,215,0</td>
# <td style="background-color:rgb(255,215,0)">&nbsp;</td></tr>
# <tr><td>Goldenrod</td><td>218,165,32</td>
# <td style="background-color:rgb(218,165,32)">&nbsp;</td></tr>
# <tr><td>Gray</td><td>128,128,128</td>
# <td style="background-color:rgb(128,128,128)">&nbsp;</td></tr>
# <tr><td>Green</td><td>0,128,0</td>
# <td style="background-color:rgb(0,128,0)">&nbsp;</td></tr>
# <tr><td>GreenYellow</td><td>173,255,47</td>
# <td style="background-color:rgb(173,255,47)">&nbsp;</td></tr>
# <tr><td>Honeydew</td><td>240,255,240</td>
# <td style="background-color:rgb(240,255,240)">&nbsp;</td></tr>
# <tr><td>HotPink</td><td>255,105,180</td>
# <td style="background-color:rgb(255,105,180)">&nbsp;</td></tr>
# <tr><td>IndianRed</td><td>205,92,92</td>
# <td style="background-color:rgb(205,92,92)">&nbsp;</td></tr>
# <tr><td>Indigo</td><td>75,0,130</td>
# <td style="background-color:rgb(75,0,130)">&nbsp;</td></tr>
# <tr><td>Ivory</td><td>255,255,240</td>
# <td style="background-color:rgb(255,255,240)">&nbsp;</td></tr>
# <tr><td>Khaki</td><td>240,230,140</td>
# <td style="background-color:rgb(240,230,140)">&nbsp;</td></tr>
# <tr><td>Lavender</td><td>230,230,250</td>
# <td style="background-color:rgb(230,230,250)">&nbsp;</td></tr>
# <tr><td>LavenderBlush</td><td>255,240,245</td>
# <td style="background-color:rgb(255,240,245)">&nbsp;</td></tr>
# <tr><td>LawnGreen</td><td>124,252,0</td>
# <td style="background-color:rgb(124,252,0)">&nbsp;</td></tr>
# <tr><td>LemonChiffon</td><td>255,250,205</td>
# <td style="background-color:rgb(255,250,205)">&nbsp;</td></tr>
# <tr><td>LightBlue</td><td>173,216,230</td>
# <td style="background-color:rgb(173,216,230)">&nbsp;</td></tr>
# <tr><td>LightCoral</td><td>240,128,128</td>
# <td style="background-color:rgb(240,128,128)">&nbsp;</td></tr>
# <tr><td>LightCyan</td><td>224,255,255</td>
# <td style="background-color:rgb(224,255,255)">&nbsp;</td></tr>
# <tr><td>LightGoldenrodYellow</td><td>250,250,210</td>
# <td style="background-color:rgb(250,250,210)">&nbsp;</td></tr>
# <tr><td>LightGreen</td><td>144,238,144</td>
# <td style="background-color:rgb(144,238,144)">&nbsp;</td></tr>
# <tr><td>LightGrey</td><td>211,211,211</td>
# <td style="background-color:rgb(211,211,211)">&nbsp;</td></tr>
# <tr><td>LightPink</td><td>255,182,193</td>
# <td style="background-color:rgb(255,182,193)">&nbsp;</td></tr>
# <tr><td>LightSalmon</td><td>255,160,122</td>
# <td style="background-color:rgb(255,160,122)">&nbsp;</td></tr>
# <tr><td>LightSeaGreen</td><td>32,178,170</td>
# <td style="background-color:rgb(32,178,170)">&nbsp;</td></tr>
# <tr><td>LightSkyBlue</td><td>135,206,250</td>
# <td style="background-color:rgb(135,206,250)">&nbsp;</td></tr>
# <tr><td>LightSlateGray</td><td>119,136,153</td>
# <td style="background-color:rgb(119,136,153)">&nbsp;</td></tr>
# <tr><td>LightSteelBlue</td><td>176,196,222</td>
# <td style="background-color:rgb(176,196,222)">&nbsp;</td></tr>
# <tr><td>LightYellow</td><td>255,255,224</td>
# <td style="background-color:rgb(255,255,224)">&nbsp;</td></tr>
# <tr><td>Lime</td><td>0,255,0</td>
# <td style="background-color:rgb(0,255,0)">&nbsp;</td></tr>
# <tr><td>LimeGreen</td><td>50,205,50</td>
# <td style="background-color:rgb(50,205,50)">&nbsp;</td></tr>
# <tr><td>Linen</td><td>250,240,230</td>
# <td style="background-color:rgb(250,240,230)">&nbsp;</td></tr>
# <tr><td>Magenta</td><td>255,0,255</td>
# <td style="background-color:rgb(255,0,255)">&nbsp;</td></tr>
# <tr><td>Maroon</td><td>128,0,0</td>
# <td style="background-color:rgb(128,0,0)">&nbsp;</td></tr>
# <tr><td>MediumAquamarine</td><td>102,205,170</td>
# <td style="background-color:rgb(102,205,170)">&nbsp;</td></tr>
# <tr><td>MediumBlue</td><td>0,0,205</td>
# <td style="background-color:rgb(0,0,205)">&nbsp;</td></tr>
# <tr><td>MediumOrchid</td><td>186,85,211</td>
# <td style="background-color:rgb(186,85,211)">&nbsp;</td></tr>
# <tr><td>MediumPurple</td><td>147,112,219</td>
# <td style="background-color:rgb(147,112,219)">&nbsp;</td></tr>
# <tr><td>MediumSeaGreen</td><td>60,179,113</td>
# <td style="background-color:rgb(60,179,113)">&nbsp;</td></tr>
# <tr><td>MediumSlateBlue</td><td>123,104,238</td>
# <td style="background-color:rgb(123,104,238)">&nbsp;</td></tr>
# <tr><td>MediumSpringGreen</td><td>0,250,154</td>
# <td style="background-color:rgb(0,250,154)">&nbsp;</td></tr>
# <tr><td>MediumTurquoise</td><td>72,209,204</td>
# <td style="background-color:rgb(72,209,204)">&nbsp;</td></tr>
# <tr><td>MediumVioletRed</td><td>199,21,133</td>
# <td style="background-color:rgb(199,21,133)">&nbsp;</td></tr>
# <tr><td>MidnightBlue</td><td>25,25,112</td>
# <td style="background-color:rgb(25,25,112)">&nbsp;</td></tr>
# <tr><td>MintCream</td><td>245,255,250</td>
# <td style="background-color:rgb(245,255,250)">&nbsp;</td></tr>
# <tr><td>MistyRose</td><td>255,228,225</td>
# <td style="background-color:rgb(255,228,225)">&nbsp;</td></tr>
# <tr><td>Moccasin</td><td>255,228,181</td>
# <td style="background-color:rgb(255,228,181)">&nbsp;</td></tr>
# <tr><td>NavajoWhite</td><td>255,222,173</td>
# <td style="background-color:rgb(255,222,173)">&nbsp;</td></tr>
# <tr><td>Navy</td><td>0,0,128</td>
# <td style="background-color:rgb(0,0,128)">&nbsp;</td></tr>
# <tr><td>OldLace</td><td>253,245,230</td>
# <td style="background-color:rgb(253,245,230)">&nbsp;</td></tr>
# <tr><td>Olive</td><td>128,128,0</td>
# <td style="background-color:rgb(128,128,0)">&nbsp;</td></tr>
# <tr><td>OliveDrab</td><td>107,142,35</td>
# <td style="background-color:rgb(107,142,35)">&nbsp;</td></tr>
# <tr><td>Orange</td><td>255,165,0</td>
# <td style="background-color:rgb(255,165,0)">&nbsp;</td></tr>
# <tr><td>OrangeRed</td><td>255,69,0</td>
# <td style="background-color:rgb(255,69,0)">&nbsp;</td></tr>
# <tr><td>Orchid</td><td>218,112,214</td>
# <td style="background-color:rgb(218,112,214)">&nbsp;</td></tr>
# <tr><td>PaleGoldenrod</td><td>238,232,170</td>
# <td style="background-color:rgb(238,232,170)">&nbsp;</td></tr>
# <tr><td>PaleGreen</td><td>152,251,152</td>
# <td style="background-color:rgb(152,251,152)">&nbsp;</td></tr>
# <tr><td>PaleTurquoise</td><td>175,238,238</td>
# <td style="background-color:rgb(175,238,238)">&nbsp;</td></tr>
# <tr><td>PaleVioletRed</td><td>219,112,147</td>
# <td style="background-color:rgb(219,112,147)">&nbsp;</td></tr>
# <tr><td>PapayaWhip</td><td>255,239,213</td>
# <td style="background-color:rgb(255,239,213)">&nbsp;</td></tr>
# <tr><td>PeachPuff</td><td>255,218,185</td>
# <td style="background-color:rgb(255,218,185)">&nbsp;</td></tr>
# <tr><td>Peru</td><td>205,133,63</td>
# <td style="background-color:rgb(205,133,63)">&nbsp;</td></tr>
# <tr><td>Pink</td><td>255,192,203</td>
# <td style="background-color:rgb(255,192,203)">&nbsp;</td></tr>
# <tr><td>Plum</td><td>221,160,221</td>
# <td style="background-color:rgb(221,160,221)">&nbsp;</td></tr>
# <tr><td>PowderBlue</td><td>176,224,230</td>
# <td style="background-color:rgb(176,224,230)">&nbsp;</td></tr>
# <tr><td>Purple</td><td>128,0,128</td>
# <td style="background-color:rgb(128,0,128)">&nbsp;</td></tr>
# <tr><td>Red</td><td>255,0,0</td>
# <td style="background-color:rgb(255,0,0)">&nbsp;</td></tr>
# <tr><td>RosyBrown</td><td>188,143,143</td>
# <td style="background-color:rgb(188,143,143)">&nbsp;</td></tr>
# <tr><td>RoyalBlue</td><td>65,105,225</td>
# <td style="background-color:rgb(65,105,225)">&nbsp;</td></tr>
# <tr><td>SaddleBrown</td><td>139,69,19</td>
# <td style="background-color:rgb(139,69,19)">&nbsp;</td></tr>
# <tr><td>Salmon</td><td>250,128,114</td>
# <td style="background-color:rgb(250,128,114)">&nbsp;</td></tr>
# <tr><td>SandyBrown</td><td>244,164,96</td>
# <td style="background-color:rgb(244,164,96)">&nbsp;</td></tr>
# <tr><td>SeaGreen</td><td>46,139,87</td>
# <td style="background-color:rgb(46,139,87)">&nbsp;</td></tr>
# <tr><td>Seashell</td><td>255,245,238</td>
# <td style="background-color:rgb(255,245,238)">&nbsp;</td></tr>
# <tr><td>Sienna</td><td>160,82,45</td>
# <td style="background-color:rgb(160,82,45)">&nbsp;</td></tr>
# <tr><td>Silver</td><td>192,192,192</td>
# <td style="background-color:rgb(192,192,192)">&nbsp;</td></tr>
# <tr><td>SkyBlue</td><td>135,206,235</td>
# <td style="background-color:rgb(135,206,235)">&nbsp;</td></tr>
# <tr><td>SlateBlue</td><td>106,90,205</td>
# <td style="background-color:rgb(106,90,205)">&nbsp;</td></tr>
# <tr><td>SlateGray</td><td>112,128,144</td>
# <td style="background-color:rgb(112,128,144)">&nbsp;</td></tr>
# <tr><td>Snow</td><td>255,250,250</td>
# <td style="background-color:rgb(255,250,250)">&nbsp;</td></tr>
# <tr><td>SpringGreen</td><td>0,255,127</td>
# <td style="background-color:rgb(0,255,127)">&nbsp;</td></tr>
# <tr><td>SteelBlue</td><td>70,130,180</td>
# <td style="background-color:rgb(70,130,180)">&nbsp;</td></tr>
# <tr><td>Tan</td><td>210,180,140</td>
# <td style="background-color:rgb(210,180,140)">&nbsp;</td></tr>
# <tr><td>Teal</td><td>0,128,128</td>
# <td style="background-color:rgb(0,128,128)">&nbsp;</td></tr>
# <tr><td>Thistle</td><td>216,191,216</td>
# <td style="background-color:rgb(216,191,216)">&nbsp;</td></tr>
# <tr><td>Tomato</td><td>255,99,71</td>
# <td style="background-color:rgb(255,99,71)">&nbsp;</td></tr>
# <tr><td>Turquoise</td><td>64,224,208</td>
# <td style="background-color:rgb(64,224,208)">&nbsp;</td></tr>
# <tr><td>Violet</td><td>238,130,238</td>
# <td style="background-color:rgb(238,130,238)">&nbsp;</td></tr>
# <tr><td>Wheat</td><td>245,222,179</td>
# <td style="background-color:rgb(245,222,179)">&nbsp;</td></tr>
# <tr><td>White</td><td>255,255,255</td>
# <td style="background-color:rgb(255,255,255)">&nbsp;</td></tr>
# <tr><td>WhiteSmoke</td><td>245,245,245</td>
# <td style="background-color:rgb(245,245,245)">&nbsp;</td></tr>
# <tr><td>Yellow</td><td>255,255,0</td>
# <td style="background-color:rgb(255,255,0)">&nbsp;</td></tr>
# <tr><td>YellowGreen</td><td>154,205,50</td>
# <td style="background-color:rgb(154,205,50)">&nbsp;</td></tr>
# </table>
#
#
class TC_Color < Test::Unit::TestCase

  # Setup for test cases, if required.
  #
  def setup
    def UI::messagebox(params)
      puts 'TESTUP OVERRIDE: UI::messagebox > ' + params.to_s
    end
  end

  # ----------------------------------------------------------------------------
  # @par Ruby Method:    Color.names
  # @file                rcolor.cpp
  #
  # The names method is used to retrieve an array of all color names
  # recognized by SketchUp.
  #
  # In general, whenever a method wants a color, you can pass in a String
  # with one of these names.
  #
  #
  # Args:
  #
  # Returns:
  # - names: an array of all SketchUp color names if
  # successful
  #

  # Test the example code that we have in the API documentation.
  def test_names_api_example
    assert_nothing_raised do
     array = Sketchup::Color.names
    end
  end

  # Test edgecases for values passed to this method.
  #def test_names_edgecases
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_equal('expected', 'result',
  #               'Failed in test_names_edgecases' )
  #end

  # Test what happens when bad arguments are passed (nil, too few, etc.)
  #def test_names_bad_params
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_raise RuntimeError do
  #    # bad arguments here that should cause errors
  #  end
  #end

  # ----------------------------------------------------------------------------
  # @par Ruby Method:    Color.to_a
  # @file                rcolor.cpp
  #
  # The to_a method is used to convert a Color object to an Array object.
  #
  #
  # Args:
  #
  # Returns:
  # - array: an Array object if successful
  #

  # Test the example code that we have in the API documentation.
  def test_to_a_api_example
    assert_nothing_raised do
     color = Sketchup::Color.new "AliceBlue"
     color_array = color.to_a
     if (color_array)
       UI.messagebox color_array.to_s
     else
       UI.messagebox "Failure"
     end
    end
  end

  # Test edgecases for values passed to this method.
  #def test_to_a_edgecases
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_equal('expected', 'result',
  #               'Failed in test_to_a_edgecases' )
  #end

  # Test what happens when bad arguments are passed (nil, too few, etc.)
  #def test_to_a_bad_params
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_raise RuntimeError do
  #    # bad arguments here that should cause errors
  #  end
  #end

  # Test that the entities method returns an Array object.
  def test_to_a_returns_array
    obj = Sketchup::Color.new 255, 0, 0
    a = obj.to_a
    result = a.class
    expected = Array
    assert_equal(expected, result, 'Expected does not match result.')
  end

  # ----------------------------------------------------------------------------
  # @par Ruby Method:    Color.green
  # @file                rcolor.cpp
  #
  # The green method is used to retrieve the green value of a color.
  # Colors are comprised of red, green, and blue values.
  #
  # Value range is 0 to 255.
  #
  #
  # Args:
  #
  # Returns:
  # - green: the green value for the color if successful
  #

  # Test the example code that we have in the API documentation.
  def test_green_api_example
    assert_nothing_raised do
     color = Sketchup::Color.new "AliceBlue"
     setting = color.green
     if (setting)
       UI.messagebox setting
     else
       UI.messagebox "Failure"
     end
    end
  end

  # Test edgecases for values passed to this method.
  #def test_green_edgecases
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_equal('expected', 'result',
  #               'Failed in test_green_edgecases' )
  #end

  # Test what happens when bad arguments are passed (nil, too few, etc.)
  #def test_green_bad_params
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_raise RuntimeError do
  #    # bad arguments here that should cause errors
  #  end
  #end

  # ----------------------------------------------------------------------------
  # @par Ruby Method:    Color.alpha=
  # @file                rcolor.cpp
  #
  # The alpha= method is used to set the opacity of the color. This method
  # has been in the Ruby API for a long time but has never actually
  # worked.
  #
  # 0 is transparent, 255 is opaque.
  #
  #
  # Args:
  # - alpha: The new opacity value.
  #
  # Returns:
  # - alpha: the newly set opacity value if successful
  #

  # Test the example code that we have in the API documentation.
  def test_set_alpha_api_example
    assert_nothing_raised do
     # NOTE: Assigning an alpha does not actually work.
     color = Sketchup::Color.new "AliceBlue"
     alpha = color.alpha = 255
    end
  end

  # Test edgecases for values passed to this method.
  #def test_set_alpha_edgecases
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_equal('expected', 'result',
  #               'Failed in test_set_alpha_edgecases' )
  #end

  # Test what happens when bad arguments are passed (nil, too few, etc.)
  #def test_set_alpha_bad_params
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_raise RuntimeError do
  #    # bad arguments here that should cause errors
  #  end
  #end

  # ----------------------------------------------------------------------------
  # @par Ruby Method:    Color.new
  # @file                rcolor.cpp
  #
  # The new method is used to create a new Color object.
  #
  #
  # Args:
  # - red: A red value.
  # - green: A green value.
  # - blue: A blue value.
  # - name: The name of a color that currently exists in SketchUp. See the
  # table at the start of this class description for more information.
  #
  # Returns:
  # - color: a Color object if successful
  #

  # Test the example code that we have in the API documentation.
  def test_new_api_example
    assert_nothing_raised do
     color = Sketchup::Color.new "OldLace"
    end
  end

  # Test edgecases for values passed to this method.
  #def test_new_edgecases
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_equal('expected', 'result',
  #               'Failed in test_new_edgecases' )
  #end

  # Test what happens when bad arguments are passed (nil, too few, etc.)
  #def test_new_bad_params
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_raise RuntimeError do
  #    # bad arguments here that should cause errors
  #  end
  #end

  # ----------------------------------------------------------------------------
  # @par Ruby Method:    Color.green=
  # @file                rcolor.cpp
  #
  # The green= method is used to set the green component of a RGB Color.
  #
  # Value range is 0 to 255.
  #
  #
  # Args:
  # - green: The green value for the color.
  #
  # Returns:
  # - green: the new green value for the color if successful
  #

  # Test the example code that we have in the API documentation.
  def test_set_green_api_example
    assert_nothing_raised do
     color = Sketchup::Color.new "AliceBlue"
     setting = color.green = 200
     if (setting)
       UI.messagebox setting
     else
       UI.messagebox "Failure"
     end
    end
  end

  # Test edgecases for values passed to this method.
  #def test_set_green_edgecases
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_equal('expected', 'result',
  #               'Failed in test_set_green_edgecases' )
  #end

  # Test what happens when bad arguments are passed (nil, too few, etc.)
  #def test_set_green_bad_params
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_raise RuntimeError do
  #    # bad arguments here that should cause errors
  #  end
  #end

  # ----------------------------------------------------------------------------
  # @par Ruby Method:    Color.red=
  # @file                rcolor.cpp
  #
  # The red= method is used to set the red component of a RGB Color.
  #
  # Value range is 0 to 255.
  #
  #
  # Args:
  # - red: The red value for the color.
  #
  # Returns:
  # - red: the new red value for the color if successful
  #

  # Test the example code that we have in the API documentation.
  def test_set_red_api_example
    assert_nothing_raised do
     color = Sketchup::Color.new "AliceBlue"
     setting = color.red=200
    end
  end

  # Test edgecases for values passed to this method.
  #def test_set_red_edgecases
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_equal('expected', 'result',
  #               'Failed in test_set_red_edgecases' )
  #end

  # Test what happens when bad arguments are passed (nil, too few, etc.)
  #def test_set_red_bad_params
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_raise RuntimeError do
  #    # bad arguments here that should cause errors
  #  end
  #end

  # ----------------------------------------------------------------------------
  # @par Ruby Method:    Color.blue=
  # @file                rcolor.cpp
  #
  # The blue= method is used to set the blue value of a color. Colors are
  # comprised of red, green, and blue values.
  #
  # Value range is 0 to 255.
  #
  #
  # Args:
  # - blue: The blue value for the color.
  #
  # Returns:
  # - blue: the new blue value for the color if successful
  #

  # Test the example code that we have in the API documentation.
  def test_set_blue_api_example
    assert_nothing_raised do
     color = Sketchup::Color.new "AliceBlue"
     setting = color.blue = 200
     if (setting)
       UI.messagebox setting
     else
       UI.messagebox "Failure"
     end
    end
  end

  # Test edgecases for values passed to this method.
  #def test_set_blue_edgecases
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_equal('expected', 'result',
  #               'Failed in test_set_blue_edgecases' )
  #end

  # Test what happens when bad arguments are passed (nil, too few, etc.)
  #def test_set_blue_bad_params
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_raise RuntimeError do
  #    # bad arguments here that should cause errors
  #  end
  #end

  # ----------------------------------------------------------------------------
  # @par Ruby Method:    Color.alpha
  # @file                rcolor.cpp
  #
  # The alpha method is used to retrieve the opacity of the color.
  #
  #
  # Args:
  #
  # Returns:
  # - alpha: the opacity of the color if successful
  #

  # Test the example code that we have in the API documentation.
  def test_alpha_api_example
    assert_nothing_raised do
     color = Sketchup::Color.new "OldLace"
     alpha = color.alpha
    end
  end

  # Test edgecases for values passed to this method.
  #def test_alpha_edgecases
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_equal('expected', 'result',
  #               'Failed in test_alpha_edgecases' )
  #end

  # Test what happens when bad arguments are passed (nil, too few, etc.)
  #def test_alpha_bad_params
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_raise RuntimeError do
  #    # bad arguments here that should cause errors
  #  end
  #end

  # ----------------------------------------------------------------------------
  # @par Ruby Method:    Color.to_i
  # @file                rcolor.cpp
  #
  # The to_i method is used to convert a Color object to an 32 bit
  # integer.
  #
  #
  # Args:
  #
  # Returns:
  # - integer: a 32 bit integer if successful
  #

  # Test the example code that we have in the API documentation.
  def test_to_i_api_example
    assert_nothing_raised do
     color = Sketchup::Color.new "AliceBlue"
     integer = color.to_i
    end
  end

  # Test edgecases for values passed to this method.
  #def test_to_i_edgecases
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_equal('expected', 'result',
  #               'Failed in test_to_i_edgecases' )
  #end

  # Test what happens when bad arguments are passed (nil, too few, etc.)
  #def test_to_i_bad_params
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_raise RuntimeError do
  #    # bad arguments here that should cause errors
  #  end
  #end

  # ----------------------------------------------------------------------------
  # @par Ruby Method:    Color.blue
  # @file                rcolor.cpp
  #
  # The blue method is used to retrieve the blue value of a color. Colors
  # are comprised of red, green, and blue values.
  #
  # Value range is 0 to 255.
  #
  #
  # Args:
  #
  # Returns:
  # - blue: the blue value for the color if successful
  #

  # Test the example code that we have in the API documentation.
  def test_blue_api_example
    assert_nothing_raised do
     color = Sketchup::Color.new "AliceBlue"
     setting = color.blue
    end
  end

  # Test edgecases for values passed to this method.
  #def test_blue_edgecases
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_equal('expected', 'result',
  #               'Failed in test_blue_edgecases' )
  #end

  # Test what happens when bad arguments are passed (nil, too few, etc.)
  #def test_blue_bad_params
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_raise RuntimeError do
  #    # bad arguments here that should cause errors
  #  end
  #end

  # ----------------------------------------------------------------------------
  # @par Ruby Method:    Color.blend
  # @file                rcolor.cpp
  #
  # The blend method is used to blend two colors.
  #
  # The blended color will be the result of taking (1 - weight) * color1
  # + weight * color2. If weight = 0, you will get color2. If weight = 1
  # you will get color1.
  #
  #
  # Args:
  # - color2: The second color to be blended (with this color).
  # - weight: A Float between 0.0 and 1.0
  #
  # Returns:
  # - color3: the newly blended Color object if successful
  #

  # Test the example code that we have in the API documentation.
  def test_blend_api_example
    assert_nothing_raised do
     color1 = Sketchup::Color.new "OldLace"
     color2 = Sketchup::Color.new "AliceBlue"
     color3 = color1.blend color2, 0.5
    end
  end

  # Test edgecases for values passed to this method.
  #def test_blend_edgecases
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_equal('expected', 'result',
  #               'Failed in test_blend_edgecases' )
  #end

  # Test what happens when bad arguments are passed (nil, too few, etc.)
  #def test_blend_bad_params
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_raise RuntimeError do
  #    # bad arguments here that should cause errors
  #  end
  #end

  # ----------------------------------------------------------------------------
  # @par Ruby Method:    Color.red
  # @file                rcolor.cpp
  #
  # The red method is used to retrieve the red component of a RGB Color.
  #
  # Value range is 0 to 255.
  #
  #
  # Args:
  #
  # Returns:
  # - red: the red value for the color if successful
  #

  # Test the example code that we have in the API documentation.
  def test_red_api_example
    assert_nothing_raised do
     color = Sketchup::Color.new "AliceBlue"
     setting = color.red
     if (setting)
       UI.messagebox setting
     else
       UI.messagebox "Failure"
     end
    end
  end

  # Test edgecases for values passed to this method.
  #def test_red_edgecases
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_equal('expected', 'result',
  #               'Failed in test_red_edgecases' )
  #end

  # Test what happens when bad arguments are passed (nil, too few, etc.)
  #def test_red_bad_params
  #  raise('AUTOGENERATED STUB. Do manual review, then delete this warning.')
  #  assert_raise RuntimeError do
  #    # bad arguments here that should cause errors
  #  end
  #end

end
