public void CorrectTestsDiscoveryForFIXTURE_TEST_CASE() { using (DummySolution solution = new DummySolution(DefaultSource, "BoostFixtureTestCase.cpp")) { #region excercise /** The BoostFixtureTestCase.cpp file consists of 4 test cases: BoostUnitTest1, Fixturetest_case1, Fixturetest_case1 and Fixturetest_case1, * BOOST_AUTO_TEST_SUITE -> Suit1 * -->BoostUnitTest1 * -->Fixturetest_case1 * -->Fixturetest_case2 * -> Master Suite * -->Fixturetest_case3 */ IList <TestCase> testList = DiscoverTests(solution); #endregion excercise #region verify AssertTestDetails(testList[0], QualifiedNameBuilder.FromString("Suit1/BoostUnitTest1")); AssertTestDetails(testList[1], QualifiedNameBuilder.FromString("Suit1/Fixturetest_case1")); AssertTestDetails(testList[2], QualifiedNameBuilder.FromString("Suit1/Fixturetest_case2")); AssertTestDetails(testList[3], QualifiedNameBuilder.FromString("Fixturetest_case3")); #endregion verify } }
public void DiscoverTestsFromSourceFileRequiringUseOfFilters() { using (DummySolution solution = new DummySolution(Source, new string[] { BoostUnitTestSampleRequiringUseOfFilters })) { IEnumerable <VSTestCase> vsTests = Discover(solution); Assert.That(vsTests.Count(), Is.EqualTo(8)); AssertBoostUnitTestSampleRequiringUseOfFilters(vsTests, solution); } }
/// <summary> /// Applies the discovery process over the provided DummySolution /// </summary> /// <param name="solution">The dummy solution on which to apply test discovery</param> /// <returns>The list of tests which were discovered from the dummy solution</returns> private IList <TestCase> DiscoverTests(DummySolution solution) { SourceCodeDiscoverer discoverer = new SourceCodeDiscoverer(solution.Provider); DefaultTestContext context = new DefaultTestContext(); DefaultTestCaseDiscoverySink discoverySink = new DefaultTestCaseDiscoverySink(); discoverer.DiscoverTests(new[] { solution.Source }, context, discoverySink); return(discoverySink.Tests.ToList()); }
public void DiscoverTestsFromMultipleFiles() { using (DummySolution solution = new DummySolution(Source, new string[] { BoostFixtureTestSuite, BoostUnitTestSample })) { IEnumerable <VSTestCase> tests = Discover(solution); Assert.That(tests.Count(), Is.EqualTo(13)); AssertBoostFixtureTestSuiteTestDetails(tests, solution); AssertBoostUnitTestSampleTestDetails(tests, solution); } }
public void MultilineBoostMacroDefinitions() { using (DummySolution solution = new DummySolution(DefaultSource, "BoostMultiLineDefinitions.cpp")) { IList <TestCase> testList = DiscoverTests(solution); AssertTestDetails(testList[0], QualifiedNameBuilder.FromString("AutoSuite/TestA")); AssertTestDetails(testList[1], QualifiedNameBuilder.FromString("AutoSuite/TestB")); AssertTestDetails(testList[2], QualifiedNameBuilder.FromString("AutoSuite/TestC")); AssertTestDetails(testList[3], QualifiedNameBuilder.FromString("AutoSuite/FixtureSuite/TestD")); } }
public void DiscoverTests() { using (DummySolution solution = new DummySolution(Source, new string[] { BoostUnitTestSample })) { IEnumerable <VSTestCase> tests = Discover(solution); Assert.That(tests.Count(), Is.EqualTo(6)); AssertBoostUnitTestSampleTestDetails(tests, solution); // NOTE BoostUnitTest123 should not be available since it is commented out Assert.That(tests.Any((test) => test.FullyQualifiedName == "BoostUnitTest123"), Is.False); } }
public void BOOST_DATA_TEST_CASEDiscovery() { using (DummySolution solution = new DummySolution(DefaultSource, "BoostDataTestCase.cpp")) { IList <TestCase> testList = DiscoverTests(solution); Assert.That(testList.Count, Is.EqualTo(3)); AssertTestDetails(testList[0], QualifiedNameBuilder.FromString("data_test_suite/data_1")); AssertTestDetails(testList[1], QualifiedNameBuilder.FromString("data_test_suite/data_2")); AssertTestDetails(testList[2], QualifiedNameBuilder.FromString("data_3")); } }
public ISolution Solve() { var wishesByAislesIdx = new List <PickingPos> [Warehouse.NbAisles]; for (int i = 0; i < wishesByAislesIdx.Length; i++) { wishesByAislesIdx[i] = new List <PickingPos>(); } foreach (var clientWish in Pickings.PickingList) { var arrayIdx = clientWish.AislesIdx - 1; wishesByAislesIdx[arrayIdx].Add(clientWish); } var wishesByAisles = new List <List <PickingPos> >(); for (int i = 0; i < wishesByAislesIdx.Length; i = i + 2) { var wishes = new List <PickingPos>(wishesByAislesIdx[i]); if (i + 1 < wishesByAislesIdx.Length) { var wishesBonus = wishesByAislesIdx[i + 1]; wishes.AddRange(wishesBonus); } if (wishes.Count == 0) { continue; } wishes = RemoveWishWithSameShiftPoint(wishes); wishesByAisles.Add(wishes); } var solution = new DummySolution { Color = Color.Indigo }; var initShiftPoint = new ShiftPoint(0, 0); var shiftPointList = new List <ShiftPoint> { initShiftPoint }; solution.ShiftPointList = shiftPointList; foreach (List <PickingPos> iter in wishesByAisles) { var wishesByAisle = OrderWishes(iter); var lastWishInTheAisle = wishesByAisle.Last(); shiftPointList.Add(new ShiftPoint(lastWishInTheAisle.PickingPointX, 0)); shiftPointList.Add(lastWishInTheAisle.ConverToShiftPoint()); shiftPointList.Add(new ShiftPoint(lastWishInTheAisle.PickingPointX, 0)); } //go to the base shiftPointList.Add(initShiftPoint); return(solution); }
public void DiscoverTestsUsingRunSettings() { using (DummySolution solution = new DummySolution(Source, new string[] { BoostUnitTestSampleRequiringUseOfFilters })) { DefaultTestContext context = new DefaultTestContext(); context.RegisterSettingProvider(BoostTestAdapterSettings.XmlRootName, new BoostTestAdapterSettingsProvider()); context.LoadEmbeddedSettings("BoostTestAdapterNunit.Resources.Settings.conditionalIncludesDisabled.runsettings"); IEnumerable <VSTestCase> vsTests = Discover(solution, context); Assert.That(vsTests.Count(), Is.EqualTo(9)); AssertBoostUnitTestSampleRequiringUseOfFilters(vsTests, solution); VSTestCase testConditional = AssertTestDetails(vsTests, QualifiedNameBuilder.FromString("BoostUnitTestShouldNotAppear3"), Source); AssertSourceDetails(testConditional, solution.SourceFileResourcePaths.First().Path, 47); } }
public void CorrectDiscoveryGenericBoostTests() { using (DummySolution solution = new DummySolution(DefaultSource, "BoostUnitTestSample.cpp")) { #region excercise IList <TestCase> tests = DiscoverTests(solution); #endregion excercise #region verify AssertTestDetails(tests.Last(), QualifiedNameBuilder.FromString("my_test<char>"), solution.SourceFileResourcePaths.First().Path, 33); #endregion verify } }
/// <summary> /// Applies the discovery process over the provided DummySolution /// </summary> /// <param name="solution">The dummy solution on which to apply test discovery</param> /// <returns>The list of tests which were discovered from the dummy solution</returns> private IList <TestCase> DiscoverTests(DummySolution solution) { DefaultTestCaseDiscoverySink discoverySink = new DefaultTestCaseDiscoverySink(); ISourceFilter[] filters = new ISourceFilter[] { new QuotedStringsFilter(), new MultilineCommentFilter(), new SingleLineCommentFilter(), new ConditionalInclusionsFilter(new ExpressionEvaluation()) }; SourceCodeDiscoverer discoverer = new SourceCodeDiscoverer(solution.Provider); discoverer.DiscoverTests(new [] { solution.Source }, new DefaultTestContext(true), discoverySink); return(discoverySink.Tests.ToList()); }
public ISolution Solve() { var lastPositionOnTheAisle = Warehouse.NbBlock * (Warehouse.AisleLenght + 2) - 2; // one for Top, one for last position var solution = new DummySolution(); var initShiftPoint = new ShiftPoint(0, 0); var shiftPointList = new List <ShiftPoint> { initShiftPoint }; int lastX = 0; for (int i = 1; i < Warehouse.NbAisles + 1; i++) { if (i % 2 == 1) { var x = ((i - 1) / 2) * 3 + 1; var goToX = new ShiftPoint(x, 0); shiftPointList.Add(goToX); var goToLastPositionOnTheAisle = new ShiftPoint(x, lastPositionOnTheAisle); shiftPointList.Add(goToLastPositionOnTheAisle); lastX = x; } else { var goToX = new ShiftPoint(lastX + 1, lastPositionOnTheAisle); shiftPointList.Add(goToX); var goToBottom = new ShiftPoint(lastX + 1, 0); shiftPointList.Add(goToBottom); } } if (Warehouse.NbAisles % 2 == 1) { var goToBottom = new ShiftPoint(lastX, 0); shiftPointList.Add(goToBottom); } shiftPointList.Add(initShiftPoint); solution.ShiftPointList = shiftPointList; return(solution); }
public ISolution Solve() { var lastPositionOnTheAisle = Warehouse.NbBlock * (Warehouse.AisleLenght + 2) - 2; // one for Top, one for last position var solution = new DummySolution(); var initShiftPoint = new ShiftPoint(0, 0); var shiftPointList = new List <ShiftPoint> { initShiftPoint }; for (int i = 1; i < Warehouse.NbAisles + 1; i = i + 2) { var x = ((i - 1) / 2) * 3 + 1; var goToX = new ShiftPoint(x, 0); shiftPointList.Add(goToX); var goToLastPositionOnTheAisle = new ShiftPoint(x, lastPositionOnTheAisle); shiftPointList.Add(goToLastPositionOnTheAisle); shiftPointList.Add(goToX); } shiftPointList.Add(initShiftPoint); solution.ShiftPointList = shiftPointList; return(solution); }
public void CorrectTestsDiscoveryForFIXTURE_TEST_SUITE() { using (DummySolution solution = new DummySolution(DefaultSource, "BoostFixtureTestSuite.cpp")) { #region exercise /** The BoostFixtureSuiteTest.cpp file consists of 3 test cases: FixtureTest1, FixtureTest2 and BoostTest, * BOOST_FIXTURE_TEST_SUITE -> FixtureSuite1 * -->BoostTest1 * -->BoostTest2 * -> Master Suite * -->BoostTest3 * BOOST_FIXTURE_TEST_SUITE -> FixtureSuite2 * -->Fixturetest_case1 * -->TemplatedTest<int> (BOOST_AUTO_TEST_CASE_TEMPLATE) * -->TemplatedTest<long> (BOOST_AUTO_TEST_CASE_TEMPLATE) * -->TemplatedTest<char> (BOOST_AUTO_TEST_CASE_TEMPLATE) */ IList <TestCase> testList = DiscoverTests(solution); #endregion exercise #region verification AssertTestDetails(testList[0], QualifiedNameBuilder.FromString("FixtureSuite1/BoostTest1")); AssertTestDetails(testList[1], QualifiedNameBuilder.FromString("FixtureSuite1/BoostTest2")); AssertTestDetails(testList[2], QualifiedNameBuilder.FromString("BoostTest3")); AssertTestDetails(testList[3], QualifiedNameBuilder.FromString("FixtureSuite2/Fixturetest_case1")); AssertTestDetails(testList[4], QualifiedNameBuilder.FromString("FixtureSuite2/TemplatedTest<int>")); AssertTestDetails(testList[5], QualifiedNameBuilder.FromString("FixtureSuite2/TemplatedTest<long>")); AssertTestDetails(testList[6], QualifiedNameBuilder.FromString("FixtureSuite2/TemplatedTest<char>")); #endregion verification } }
public ISolution Solve() { var wishesByAislesIdx = new List <PickingPos> [Warehouse.NbAisles]; for (int i = 0; i < wishesByAislesIdx.Length; i++) { wishesByAislesIdx[i] = new List <PickingPos>(); } foreach (var clientWish in Pickings.PickingList) { var arrayIdx = clientWish.AislesIdx - 1; wishesByAislesIdx[arrayIdx].Add(clientWish); } var solution = new DummySolution { Color = Color.Chocolate }; var initShiftPoint = new ShiftPoint(0, 0); var shiftPointList = new List <ShiftPoint> { initShiftPoint }; var topY = (Warehouse.NbBlock - 1) * (Warehouse.AisleLenght + 2) + Warehouse.AisleLenght + 1; var currentLFrontj = new List <ShiftPoint>(); var currentLBackj = new List <ShiftPoint>(); for (int i = 0; i < wishesByAislesIdx.Length; i = i + 2) { var wishes = new List <PickingPos>(wishesByAislesIdx[i]); if (i + 1 < wishesByAislesIdx.Length) { var wishesBonus = wishesByAislesIdx[i + 1]; wishes.AddRange(wishesBonus); } if (wishes.Count == 0) { continue; } if (currentLFrontj.Count == 0) { wishes = wishes.OrderBy(w => w.BlockIdx).ThenBy(w => w.PositionIdx).ToList(); var wishNearBackAisle = wishes.Last(); var topInit = new ShiftPoint(wishNearBackAisle.PickingPointX, topY); var bottomInit = new ShiftPoint(wishNearBackAisle.PickingPointX, 0); var pickingPos = wishes.Select(x => x.ConverToShiftPoint()).Distinct().ToList(); currentLFrontj.Add(bottomInit); currentLFrontj.AddRange(pickingPos); currentLFrontj.Add(bottomInit); currentLBackj.Add(bottomInit); currentLBackj.AddRange(pickingPos); currentLBackj.Add(topInit); } else { var res = Solve_for_next_aisle(wishes, currentLFrontj, currentLBackj); currentLFrontj = res.Item1; currentLBackj = res.Item2; } } shiftPointList.AddRange(currentLFrontj); shiftPointList.Add(initShiftPoint); solution.ShiftPointList = shiftPointList; return(solution); }
public ISolution Solve() { var wishesByAislesIdx = new List <PickingPos> [Warehouse.NbAisles]; for (int i = 0; i < wishesByAislesIdx.Length; i++) { wishesByAislesIdx[i] = new List <PickingPos>(); } foreach (var clientWish in Pickings.PickingList) { var arrayIdx = clientWish.AislesIdx - 1; wishesByAislesIdx[arrayIdx].Add(clientWish); } var wishesByAisles = new List <List <PickingPos> >(); for (int i = 0; i < wishesByAislesIdx.Length; i = i + 2) { var wishes = new List <PickingPos>(wishesByAislesIdx[i]); if (i + 1 < wishesByAislesIdx.Length) { var wishesBonus = wishesByAislesIdx[i + 1]; wishes.AddRange(wishesBonus); } if (wishes.Count == 0) { continue; } wishes = RemoveWishWithSameShiftPoint(wishes); wishesByAisles.Add(wishes); } var solution = new DummySolution { Color = Color.Green }; var initShiftPoint = new ShiftPoint(0, 0); var shiftPointList = new List <ShiftPoint> { initShiftPoint }; solution.ShiftPointList = shiftPointList; // top Y = last line of the warehouse var topY = (Warehouse.NbBlock - 1) * (Warehouse.AisleLenght + 2) + Warehouse.AisleLenght + 1; // special case for first and last aisle var firstAisle = wishesByAisles.FirstOrDefault(); if (firstAisle == null) { // no wish shiftPointList.Add(initShiftPoint); return(solution); } wishesByAisles.Remove(firstAisle); var lastAisle = wishesByAisles.LastOrDefault(); wishesByAisles.Remove(lastAisle); // go through the first aisle firstAisle = OrderWishes(firstAisle, true); var firstXPos = firstAisle.First().PickingPointX; shiftPointList.Add(new ShiftPoint(firstXPos, 0)); shiftPointList.AddRange(firstAisle.Select(wish => wish.ConverToShiftPoint())); shiftPointList.Add(new ShiftPoint(firstXPos, topY)); // do the largest algo coming foreach (List <PickingPos> iter in wishesByAisles) { var wishesByAisle = OrderWishes(iter, false); var largestGap = 0; ShiftPoint currentPos = null; int currentGap; int nbWishes = 0; int potentialNbWishes = 0; var previousY = topY; foreach (var currentWish in wishesByAisle) { currentPos = currentWish.ConverToShiftPoint(); currentGap = previousY - currentPos.Y; if (currentGap > largestGap) { largestGap = currentGap; nbWishes += potentialNbWishes; potentialNbWishes = 0; } potentialNbWishes++; previousY = currentPos.Y; } currentGap = previousY - 0; if (currentGap > largestGap) { nbWishes += potentialNbWishes; } var wishDoneInComming = new List <PickingPos>(); if (nbWishes > 0) { // ReSharper disable once PossibleNullReferenceException var topAisle = new ShiftPoint(currentPos.X, topY); // we enter in this aisle shiftPointList.Add(topAisle); wishDoneInComming.AddRange(wishesByAisle.GetRange(0, nbWishes)); wishesByAisle.RemoveRange(0, nbWishes); shiftPointList.AddRange(wishDoneInComming.Select(wish => wish.ConverToShiftPoint())); // return to top shiftPointList.Add(topAisle); } iter.Clear(); iter.AddRange(wishesByAisle); } // go through the last aisle if (lastAisle == null) { // only one aisle shiftPointList.Add(new ShiftPoint(firstXPos, 0)); } else { var lastXPos = lastAisle.First().PickingPointX; shiftPointList.Add(new ShiftPoint(lastXPos, topY)); lastAisle = OrderWishes(lastAisle, false); shiftPointList.AddRange(lastAisle.Select(wish => wish.ConverToShiftPoint())); shiftPointList.Add(new ShiftPoint(lastXPos, 0)); } // do the largest algo return wishesByAisles.Reverse(); foreach (var wishesByAisle in wishesByAisles) { if (wishesByAisle.Count == 0) { continue; } // enter in the aisle var posX = wishesByAisle.First().PickingPointX; shiftPointList.Add(new ShiftPoint(posX, 0)); wishesByAisle.Reverse(); shiftPointList.AddRange(wishesByAisle.Select(wish => wish.ConverToShiftPoint())); // return to the bottom of the aisle shiftPointList.Add(new ShiftPoint(posX, 0)); } //go to the base shiftPointList.Add(initShiftPoint); return(solution); }
public ISolution Solve() { var isLastDirectionUp = false; var wishesByAislesIdx = new List <PickingPos> [Warehouse.NbAisles]; for (int i = 0; i < wishesByAislesIdx.Length; i++) { wishesByAislesIdx[i] = new List <PickingPos>(); } foreach (var clientWish in Pickings.PickingList) { var arrayIdx = clientWish.AislesIdx - 1; wishesByAislesIdx[arrayIdx].Add(clientWish); } var solution = new DummySolution { Color = Color.Blue }; var initShiftPoint = new ShiftPoint(0, 0); var shiftPointList = new List <ShiftPoint> { initShiftPoint }; // top Y = last line of the warehouse var topY = (Warehouse.NbBlock - 1) * (Warehouse.AisleLenght + 2) + Warehouse.AisleLenght + 1; for (int i = 0; i < wishesByAislesIdx.Length; i = i + 2) { var wishes = new List <PickingPos>(wishesByAislesIdx[i]); if (i + 1 < wishesByAislesIdx.Length) { var wishesBonus = wishesByAislesIdx[i + 1]; wishes.AddRange(wishesBonus); } if (wishes.Count == 0) { continue; } var shiftPoints = OrderWishesByAisle(wishes, isLastDirectionUp); var lastShiftPoint = shiftPoints.Last(); var topWish = new ShiftPoint(lastShiftPoint.X, topY); var bottomWish = new ShiftPoint(lastShiftPoint.X, 0); if (isLastDirectionUp) { // add bottom path shiftPoints.Add(bottomWish); shiftPoints.Insert(0, topWish); } else { // add top path shiftPoints.Add(topWish); shiftPoints.Insert(0, bottomWish); } shiftPointList.AddRange(shiftPoints); isLastDirectionUp = !isLastDirectionUp; } // this is the last aisles, we will go to the base var lastVisitedAisles = shiftPointList.Last(); if (isLastDirectionUp) { var bottomOfLastAisles = new ShiftPoint(lastVisitedAisles.X, 0); shiftPointList.Add(bottomOfLastAisles); } shiftPointList.Add(initShiftPoint); solution.ShiftPointList = shiftPointList; return(solution); }
public ISolution Solve() { var wishesByBlockAndAisles = new Dictionary <int, Dictionary <int, List <PickingPos> > >(); var leftPickAisle = int.MaxValue; foreach (var pickingPos in Pickings.PickingList) { if (pickingPos.AislesIdx < leftPickAisle) { leftPickAisle = pickingPos.AislesIdx; } Dictionary <int, List <PickingPos> > wishesByAisles; if (wishesByBlockAndAisles.ContainsKey(pickingPos.BlockIdx)) { wishesByAisles = wishesByBlockAndAisles[pickingPos.BlockIdx]; } else { wishesByAisles = new Dictionary <int, List <PickingPos> >(); wishesByBlockAndAisles.Add(pickingPos.BlockIdx, wishesByAisles); } List <PickingPos> wishes; if (wishesByAisles.ContainsKey(pickingPos.AislesIdx)) { wishes = wishesByAisles[pickingPos.AislesIdx]; } else { wishes = new List <PickingPos>(); wishesByAisles.Add(pickingPos.AislesIdx, wishes); } wishes.Add(pickingPos); } var leftPickingPointX = ConvertAislesIndexToPickingX(leftPickAisle); var orderWishesByBlockAndAisles = wishesByBlockAndAisles.OrderByDescending(x => x.Value.Values.First().First().BlockIdx).ToList(); var solution = new DummySolution { Color = Color.MidnightBlue }; var initShiftPoint = new ShiftPoint(0, 0); var bottomLeftPickingAisle = new ShiftPoint(leftPickingPointX, 0); var shiftPointList = new List <ShiftPoint> { initShiftPoint, bottomLeftPickingAisle }; //for (int i = 0; i < orderWishesByBlockAndAisles.Count; i = i + 2) var isFirstBlock = true; var lastShiftPoint = bottomLeftPickingAisle; foreach (var wishesByAisleCouple in orderWishesByBlockAndAisles) { var blockIndex = wishesByAisleCouple.Key; var wishesByAisle = wishesByAisleCouple.Value; if (isFirstBlock) { isFirstBlock = false; var shiftPointDoneInFirstTrip = RemoveLastAisleForAllOtherBlock(leftPickAisle, orderWishesByBlockAndAisles); shiftPointList.AddRange(shiftPointDoneInFirstTrip); var bottomY = (blockIndex - 1) * (Warehouse.AisleLenght + 2); //we go to the bottom var frontFirstBlock = new ShiftPoint(lastShiftPoint.X, bottomY); if (!frontFirstBlock.Equals(shiftPointList.Last())) { //go to the front of this block on the left aisle shiftPointList.Add(frontFirstBlock); lastShiftPoint = frontFirstBlock; } var orderedWishesByAisle = wishesByAisle.OrderBy(x => x.Key).ToList(); lastShiftPoint = SShapeOnAisle(blockIndex, orderedWishesByAisle, wishesByAisle, shiftPointList, lastShiftPoint, false); } else { // we are one cell upper than the back/top of this block if (wishesByAisle.Values.Count == 0) { // we already have done all the aisle in this block in the frist trip var bottomY = (blockIndex - 1) * (Warehouse.AisleLenght + 2); //we go to the bottom var finalShitPoint = new ShiftPoint(shiftPointList.Last().X, bottomY); shiftPointList.Add(finalShitPoint); lastShiftPoint = finalShitPoint; } else { // we should redo sshape algo for this block var aislesIdx = wishesByAisle.Keys.ToList(); aislesIdx.Sort(); var leftAisleCurrentBlock = aislesIdx.First(); var leftX = ConvertAislesIndexToPickingX(leftAisleCurrentBlock); var rightAisleCurrentBlock = aislesIdx.Last(); var rightX = ConvertAislesIndexToPickingX(rightAisleCurrentBlock); var sShapeLeftToRight = !(Math.Abs(lastShiftPoint.X - rightX) < Math.Abs(lastShiftPoint.X - leftX)); var orderedWishesByAisle = sShapeLeftToRight ? wishesByAisle.OrderBy(x => x.Key).ToList() : wishesByAisle.OrderByDescending(x => x.Key).ToList(); lastShiftPoint = SShapeOnAisle(blockIndex, orderedWishesByAisle, wishesByAisle, shiftPointList, lastShiftPoint, true); } } } shiftPointList.Add(initShiftPoint); solution.ShiftPointList = shiftPointList; return(solution); }
/// <summary> /// Asserts test details for tests contained within the "BoostFixtureTestSuite.cpp" source file /// </summary> /// <param name="tests">The discovered test case enumeration</param> /// <param name="solution">The dummy solution which contains a project referencing "BoostFixtureTestSuite.cpp"</param> private void AssertBoostFixtureTestSuiteTestDetails(IEnumerable <VSTestCase> tests, DummySolution solution) { DummySourceFile codeFile = solution.SourceFileResourcePaths.First((source) => source.Path.EndsWith(BoostFixtureTestSuite)); AssertBoostFixtureTestSuiteTestDetails(tests, solution.Source, codeFile.Path); }
private void AssertBoostUnitTestSampleRequiringUseOfFilters(IEnumerable <VSTestCase> tests, DummySolution solution) { DummySourceFile codeFile = solution.SourceFileResourcePaths.First((source) => source.Path.EndsWith(BoostUnitTestSampleRequiringUseOfFilters)); AssertBoostUnitTestSampleRequiringUseOfFilters(tests, solution.Source, codeFile.Path); }
/// <summary> /// Applies the discovery procedure over the dummy solution /// </summary> /// <param name="solution">A dummy solution from which to discover tests from</param> /// <returns>An enumeration of discovered test cases</returns> private IEnumerable <VSTestCase> Discover(DummySolution solution) { return(Discover(solution.Provider, new string[] { solution.Source })); }
/// <summary> /// Applies the discovery procedure over the dummy solution /// </summary> /// <param name="solution">A dummy solution from which to discover tests from</param> /// <param name="context">The IDiscoveryContext to use</param> /// <returns>An enumeration of discovered test cases</returns> private IEnumerable <VSTestCase> Discover(DummySolution solution, IDiscoveryContext context) { return(Discover(solution.Provider, new string[] { solution.Source }, context)); }