Example #1
0
        public void GetGuitarTypeWithSuggestedName_should_Return_Tuple()
        {
            TupleExample tupleExample = new TupleExample();
            var          guitar       = tupleExample.GetGuitarTypeWithSuggestedName();

            Assert.AreEqual("Les Paul Studio", guitar.GuitarType);
            Assert.AreEqual(6, guitar.StringCount);
        }
Example #2
0
        public void PlayInstrument_Tuple_As_Parameter()
        {
            (string GuitarType, int StringCount)instrument = ("violin", 2);
            TupleExample tupleExample = new TupleExample();
            var          result       = tupleExample.PlayInstrument(instrument);

            Assert.AreEqual("violin", result.Item1);
            Assert.AreEqual(2, result.Item2);
        }
Example #3
0
        public void GetGuitarTypeWithSuggestedName_Deconstruction()
        {
            TupleExample tupleExample = new TupleExample();

            (string GuitarType, int StringCount) = tupleExample.GetGuitarTypeWithSuggestedName();

            Assert.AreEqual("Les Paul Studio", GuitarType);
            Assert.AreEqual(6, StringCount);
        }
Example #4
0
        public void GetGuitarTypeWithSuggestedName_With_Changed_Name()
        {
            TupleExample tupleExample = new TupleExample();

            (string GuitarTypeChanged, int StringCountChanged)guitar = tupleExample.GetGuitarTypeWithSuggestedName();

            Assert.AreEqual("Les Paul Studio", guitar.GuitarTypeChanged);
            Assert.AreEqual(6, guitar.StringCountChanged);
        }
Example #5
0
        public void GetGuitarType_should_Return_Tuple()
        {
            TupleExample tupleExample = new TupleExample();

            var(item1, item2) = tupleExample.GetGuitarType();

            Assert.AreEqual("Stairway to Heaven", item1);
            Assert.AreEqual(1, item2);
        }