Exemplo n.º 1
0
        public void BlockReturnsDefaultColourIfAxisNotSet()
        {
            Cube.IBlock block = new Cube.Block(Cube.Axis.x, Cube.Colour.Blue);

            Assert.AreEqual(block.get_colour_in_axis(Cube.Axis.y), Cube.Colour.Blank);
            Assert.AreEqual(block.get_colour_in_axis(Cube.Axis.z), Cube.Colour.Blank);
        }
Exemplo n.º 2
0
        public void BlockReturnsDefaultColourIfAxisNotSet()
        {
            Cube.IBlock block = new Cube.Block(Cube.Axis.x, Cube.Colour.Blue);

            Assert.AreEqual(block.get_colour_in_axis(Cube.Axis.y), Cube.Colour.Blank);
            Assert.AreEqual(block.get_colour_in_axis(Cube.Axis.z), Cube.Colour.Blank);
        }
Exemplo n.º 3
0
 public void BlockReturnsAColourInSomeAxis()
 {
     Cube.IBlock block = new Cube.Block(Cube.Axis.x, Cube.Colour.Blue);
     bool colourFound = false;
     foreach (Cube.Axis axis in Enum.GetValues(typeof(Cube.Axis)))
     {
         colourFound = colourFound || block.get_colour_in_axis(Cube.Axis.x).GetType() == typeof(Cube.Colour);
     }
     Assert.IsTrue(colourFound);
 }
Exemplo n.º 4
0
 public void AllAxesReturnAColour()
 {
     Cube.IBlock block = new Cube.Block(Cube.Axis.x, Cube.Colour.Blue);
     bool colourFound = true;
     foreach (Cube.Axis axis in Enum.GetValues(typeof(Cube.Axis)))
     {
         colourFound = colourFound && block.get_colour_in_axis(Cube.Axis.x).GetType() == typeof(Cube.Colour);
     }
     Assert.IsTrue(colourFound);
 }
Exemplo n.º 5
0
        public void BlockReturnsAColourInSomeAxis()
        {
            Cube.IBlock block       = new Cube.Block(Cube.Axis.x, Cube.Colour.Blue);
            bool        colourFound = false;

            foreach (Cube.Axis axis in Enum.GetValues(typeof(Cube.Axis)))
            {
                colourFound = colourFound || block.get_colour_in_axis(Cube.Axis.x).GetType() == typeof(Cube.Colour);
            }
            Assert.IsTrue(colourFound);
        }
Exemplo n.º 6
0
        public void AllAxesReturnAColour()
        {
            Cube.IBlock block       = new Cube.Block(Cube.Axis.x, Cube.Colour.Blue);
            bool        colourFound = true;

            foreach (Cube.Axis axis in Enum.GetValues(typeof(Cube.Axis)))
            {
                colourFound = colourFound && block.get_colour_in_axis(Cube.Axis.x).GetType() == typeof(Cube.Colour);
            }
            Assert.IsTrue(colourFound);
        }
Exemplo n.º 7
0
        public void BlockReturnsColourOfAxisItsSetTo()
        {
            Cube.IBlock block = new Cube.Block(Cube.Axis.x, Cube.Colour.Blue);

            Assert.AreEqual(block.get_colour_in_axis(Cube.Axis.x), Cube.Colour.Blue);
        }
Exemplo n.º 8
0
        public void BlockReturnsColourOfAxisItsSetTo()
        {
            Cube.IBlock block = new Cube.Block(Cube.Axis.x, Cube.Colour.Blue);

            Assert.AreEqual(block.get_colour_in_axis(Cube.Axis.x), Cube.Colour.Blue);
        }