当前位置: 首页>>代码示例>>C#>>正文


C# List.Condense方法代码示例

本文整理汇总了C#中NUnit.Framework.List.Condense方法的典型用法代码示例。如果您正苦于以下问题:C# List.Condense方法的具体用法?C# List.Condense怎么用?C# List.Condense使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NUnit.Framework.List的用法示例。


在下文中一共展示了List.Condense方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Condense_GivenOneLeft2AndOneLeftClockwise_ReturnsLeftAntiClockwise

        public void Condense_GivenOneLeft2AndOneLeftClockwise_ReturnsLeftAntiClockwise()
        {
            var list = new List<IRotation> { Rotations.Left2, Rotations.LeftClockwise, Rotations.RightClockwise };

            var condensed = list.Condense();

            CollectionAssert.AreEqual(new[] { Rotations.LeftAntiClockwise, Rotations.RightClockwise }, condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs

示例2: Condense_GivenAListThatCannotBeCondensed_ReturnsTheSameList

        public void Condense_GivenAListThatCannotBeCondensed_ReturnsTheSameList()
        {
            var list = new List<IRotation> { Rotations.LeftClockwise, Rotations.RightClockwise };

            var condensed = list.Condense();

            Assert.AreEqual(list, condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs

示例3: Condense_GivenTwoLeft2Rotations_RemovesBothRotations

        public void Condense_GivenTwoLeft2Rotations_RemovesBothRotations()
        {
            var list = new List<IRotation> { Rotations.Left2, Rotations.Left2, Rotations.RightClockwise };

            var condensed = list.Condense();

            CollectionAssert.AreEqual(new[] { Rotations.RightClockwise }, condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs

示例4: Condense_FaceRotations_RegressionTest1

        public void Condense_FaceRotations_RegressionTest1()
        {
            var list = new List<IRotation> { Rotations.LeftClockwise, Rotations.UpperClockwise, Rotations.UpperClockwise, Rotations.UpperAntiClockwise, Rotations.UpperAntiClockwise, Rotations.UpperClockwise, Rotations.LeftClockwise };

            var condensed = list.Condense();

            CollectionAssert.AreEqual(new[] { Rotations.LeftClockwise, Rotations.UpperClockwise, Rotations.LeftClockwise }, condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs

示例5: Condense_CubeRotationsRegressionTest1

        public void Condense_CubeRotationsRegressionTest1()
        {
            var list = new List<IRotation> { CubeRotations.YClockwise, CubeRotations.XClockwise, CubeRotations.XClockwise, CubeRotations.XAntiClockwise, CubeRotations.XAntiClockwise, CubeRotations.XClockwise, CubeRotations.YClockwise };

            var condensed = list.Condense();

            CollectionAssert.AreEqual(new[] { CubeRotations.YClockwise, CubeRotations.XClockwise, CubeRotations.YClockwise }, condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs

示例6: Condense_GivenFourYClockwise_RemovesAllCubeRotations

        public void Condense_GivenFourYClockwise_RemovesAllCubeRotations()
        {
            var list = new List<IRotation> { CubeRotations.YClockwise, CubeRotations.YClockwise, CubeRotations.YClockwise, CubeRotations.YClockwise, CubeRotations.ZClockwise };

            var condensed = list.Condense();

            CollectionAssert.AreEqual(new[] { CubeRotations.ZClockwise }, condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs

示例7: Condense_GivenThreeYClockwise_ReturnsSingleYAntiClockwise

        public void Condense_GivenThreeYClockwise_ReturnsSingleYAntiClockwise()
        {
            var list = new List<IRotation> { CubeRotations.YClockwise, CubeRotations.YClockwise, CubeRotations.YClockwise, CubeRotations.ZClockwise };

            var condensed = list.Condense();

            CollectionAssert.AreEqual(new[] { CubeRotations.YAntiClockwise, CubeRotations.ZClockwise }, condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs

示例8: Condense_GivenOneYClockwiseAndOneYAnitClockwiseCubeRotations_RemovesBothCubeRotations

        public void Condense_GivenOneYClockwiseAndOneYAnitClockwiseCubeRotations_RemovesBothCubeRotations()
        {
            var list = new List<IRotation> { CubeRotations.YClockwise, CubeRotations.YAntiClockwise, CubeRotations.ZClockwise };

            var condensed = list.Condense();

            CollectionAssert.AreEqual(new[] { CubeRotations.ZClockwise }, condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs

示例9: Condense_GivenTwoY2CubeRotations_RemovesBothCubeRotations

        public void Condense_GivenTwoY2CubeRotations_RemovesBothCubeRotations()
        {
            var list = new List<IRotation> { CubeRotations.Y2, CubeRotations.Y2, CubeRotations.ZClockwise };

            var condensed = list.Condense();

            CollectionAssert.AreEqual(new[] { CubeRotations.ZClockwise }, condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs

示例10: Condense_GivenTwoYClockwiseCubeRotations_ReturnsASingleY2Rotation

        public void Condense_GivenTwoYClockwiseCubeRotations_ReturnsASingleY2Rotation()
        {
            var list = new List<IRotation> { CubeRotations.YClockwise, CubeRotations.YClockwise, CubeRotations.ZClockwise };

            var condensed = list.Condense();

            CollectionAssert.AreEqual(new[] { CubeRotations.Y2, CubeRotations.ZClockwise }, condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs

示例11: Condense_GivenAListOfCubeRotationsThatCannotBeCondensed_ReturnsTheSameList

        public void Condense_GivenAListOfCubeRotationsThatCannotBeCondensed_ReturnsTheSameList()
        {
            var list = new List<IRotation> { CubeRotations.YClockwise, CubeRotations.ZClockwise };

            var condensed = list.Condense();

            Assert.AreEqual(list, condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs

示例12: Condense_GivenOneLeftClockwiseAndOneLeftAnitClockwiseRotationsOnDifferentLayers_RemovesNoRotations

        public void Condense_GivenOneLeftClockwiseAndOneLeftAnitClockwiseRotationsOnDifferentLayers_RemovesNoRotations()
        {
            var list = new List<IRotation> { Rotations.SecondLayerLeftClockwise, Rotations.LeftAntiClockwise };

            var condensed = list.Condense();

            CollectionAssert.AreEqual(list, condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs

示例13: Condense_GivenOneLeftClockwiseAndOneLeftAnitClockwiseRotationsOnTheSameLayer_RemovesBothRotations

        public void Condense_GivenOneLeftClockwiseAndOneLeftAnitClockwiseRotationsOnTheSameLayer_RemovesBothRotations()
        {
            var list = new List<IRotation> { Rotations.SecondLayerLeftClockwise, Rotations.SecondLayerLeftAntiClockwise };

            var condensed = list.Condense();

            CollectionAssert.IsEmpty(condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs

示例14: Condense_GivenTwoLeftClockwiseRotationsOnTheSameLayer_RemovesBothRotationsAndAddsADoubleRotationForThatLayer

        public void Condense_GivenTwoLeftClockwiseRotationsOnTheSameLayer_RemovesBothRotationsAndAddsADoubleRotationForThatLayer()
        {
            var list = new List<IRotation> { Rotations.SecondLayerLeftClockwise, Rotations.SecondLayerLeftClockwise };

            var condensed = list.Condense();

            CollectionAssert.AreEqual(new [] { Rotations.SecondLayerLeft2 }, condensed);
        }
开发者ID:EdwardSalter,项目名称:NCubeSolver,代码行数:8,代码来源:RotationListExTests.cs


注:本文中的NUnit.Framework.List.Condense方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。