本文整理匯總了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}