示例#1
0
        public void Added_ExpandsArray()
        {
            // arrange
            var r1 = new InternalResources(1, 2);
            var r2 = new InternalResources(0, 0, 3);

            // act
            var result = r1.Added(r2);

            // assert
            Assert.True(result.ResourcesArray.SequenceEqual(new float[] { 1, 2, 3 }));
        }
示例#2
0
        public void Added_ReturnsSummandOfTwoElements()
        {
            // arrange
            var r1 = new InternalResources(1, 2, 3);
            var r2 = new InternalResources(2, 3, 4);

            // act
            var result = r1.Added(r2);

            // assert
            Assert.True(result.ResourcesArray.SequenceEqual(new float[] { 3, 5, 7 }));
            Assert.True(r1.ResourcesArray.SequenceEqual(new float[] { 1, 2, 3 }));
            Assert.True(r2.ResourcesArray.SequenceEqual(new float[] { 2, 3, 4 }));
        }