public void Access_TestEdited_Check_GivenInvalidModel() { var testData = TestModelData.TestData(); var options = new DbContextOptionsBuilder <TestMakerContext>() .UseInMemoryDatabase(databaseName: "Access_TestEdited_Check_GivenInvalidModel") .Options; using var _context = new TestMakerContext(options); _context.Tests.Add(testData[0]); foreach (var q in testData[0].Questions) { _context.Questions.Add(q); } foreach (var c in testData[0].Questions[0].Choices) { _context.Choices.Add(c); } _context.SaveChanges(); ITestRepository testRepository = new TestRepository(_context); var controller = new TestController(testRepository); controller.ModelState.AddModelError("error", "some error"); var view = controller.Edit(1, testData[0]) as ViewResult; Assert.Null(view.ViewName); }
public void Access_TestDetails_check_viewData() { var testData = TestModelData.TestData(); var options = new DbContextOptionsBuilder <TestMakerContext>() .UseInMemoryDatabase(databaseName: "Access_TestDetails_check_viewData") .Options; using var _context = new TestMakerContext(options); _context.Tests.Add(testData[0]); foreach (var q in testData[0].Questions) { _context.Questions.Add(q); } foreach (var c in testData[0].Questions[0].Choices) { _context.Choices.Add(c); } _context.SaveChanges(); ITestRepository testRepository = new TestRepository(_context); var controller = new TestController(testRepository); var view = controller.Details(1) as ViewResult; Assert.Equal("Details", view.ViewData["Title"]); Assert.Equal("Details", view.ViewData["Action"]); Assert.Equal("Test", view.ViewData["Controller"]); }
public void Adapter_GeneratesCorrectTestModel() { TestModelData testModel = Runner.Report.TestModel; Assert.AreEqual(1, testModel.RootTest.Children.Count, "Root test contain top level test."); TestData fileTest = testModel.RootTest.Children[0]; Assert.AreEqual("bowling_spec", fileTest.Name, "Top level test is named for the file."); Assert.EndsWith(fileTest.Metadata.GetValue(MetadataKeys.File), "bowling_spec.rb", "Top level test has correct file path metadata."); Assert.AreEqual("RSpec File", fileTest.Metadata.GetValue(MetadataKeys.TestKind), "Top level test should have correct kind."); Assert.AreEqual(1, fileTest.Children.Count, "Top level test contains example group."); TestData exampleGroupTest = fileTest.Children[0]; Assert.AreEqual("Bowling", exampleGroupTest.Name, "Example group is named as in 'describe' syntax."); Assert.AreEqual("RSpec Example Group", exampleGroupTest.Metadata.GetValue(MetadataKeys.TestKind), "Example group test should have correct kind."); Assert.AreEqual(3, exampleGroupTest.Children.Count, "Example group test contains examples."); TestData passingExampleTest = exampleGroupTest.Children[0]; Assert.AreEqual("should score 0 for gutter game", passingExampleTest.Name, "Example is named as in 'it' syntax."); Assert.AreEqual("RSpec Example", passingExampleTest.Metadata.GetValue(MetadataKeys.TestKind), "Example test should have correct kind."); TestData failingExampleTest = exampleGroupTest.Children[1]; Assert.AreEqual("should score 300 for perfect game", failingExampleTest.Name, "Example is named as in 'it' syntax."); Assert.AreEqual("RSpec Example", failingExampleTest.Metadata.GetValue(MetadataKeys.TestKind), "Example test should have correct kind."); TestData pendingExampleTest = exampleGroupTest.Children[2]; Assert.AreEqual("should score 20 for single pin hit each ball", pendingExampleTest.Name, "Example is named as in 'it' syntax."); Assert.AreEqual("RSpec Example", pendingExampleTest.Metadata.GetValue(MetadataKeys.TestKind), "Example test should have correct kind."); }
public void Establish_context() { metadataTreeBuilder = new MetadataTreeBuilder(); testModelData = new TestModelData(); var assembly = CreateTestData("assembly"); testModelData.RootTest.Children.Add(assembly); var fixture1 = CreateTestData("fixture1"); var fixture2 = CreateTestData("fixture2"); assembly.Children.AddRange(new[] { fixture1, fixture2 }); var test1 = CreateTestData("test1"); var test2 = CreateTestData("test2"); fixture1.Children.AddRange(new[] { test1, test2 }); var test3 = CreateTestData("test3"); test3.Metadata.Add(Metadata, "metadata"); test3.Metadata.Add(Metadata, "metadata2"); fixture2.Children.Add(test3); var fixture3 = CreateTestData("fixture3"); fixture3.Metadata.Add(Metadata, "metadata"); assembly.Children.Add(fixture3); var test4 = CreateTestData("test4"); test4.Metadata.Add(Metadata, "metadata"); fixture3.Children.Add(test4); }
public void Access_TestCreated_Check_db() { var testData = TestModelData.TestData(); var options = new DbContextOptionsBuilder <TestMakerContext>() .UseInMemoryDatabase(databaseName: "Access_TestCreated_Check_db") .Options; using var _context = new TestMakerContext(options); ITestRepository testRepository = new TestRepository(_context); var controller = new TestController(testRepository); var actionResult = controller.Create(testData[0]); Assert.Equal(testData[0].TestId, _context.Tests.FirstOrDefault().TestId); Assert.Equal(testData[0].Title, _context.Tests.FirstOrDefault().Title); Assert.Equal(testData[0].CreatedTime, _context.Tests.FirstOrDefault().CreatedTime); Assert.Equal(testData[0].UpdatedTime, _context.Tests.FirstOrDefault().UpdatedTime); Assert.Equal(testData[0].UserId, _context.Tests.FirstOrDefault().UserId); Assert.Equal(testData[0].Questions[0].QuestionText, _context.Tests.FirstOrDefault().Questions[0].QuestionText); Assert.Equal(testData[0].Questions[0].TestId, _context.Tests.FirstOrDefault().Questions[0].TestId); Assert.Equal(testData[0].Questions[0].Choices[0].ChoiceId, _context.Tests.FirstOrDefault().Questions[0].Choices[0].ChoiceId); Assert.Equal(testData[0].Questions[0].Choices[0].ChoiceText, _context.Tests.FirstOrDefault().Questions[0].Choices[0].ChoiceText); Assert.Equal(testData[0].Questions[0].Choices[0].IsAnswer, _context.Tests.FirstOrDefault().Questions[0].Choices[0].IsAnswer); Assert.Equal(testData[0].Questions[0].Choices[0].IsUsersAnswerCheck, _context.Tests.FirstOrDefault().Questions[0].Choices[0].IsUsersAnswerCheck); Assert.Equal(testData[0].Questions[0].Choices[0].IsUsersAnswerRadio, _context.Tests.FirstOrDefault().Questions[0].Choices[0].IsUsersAnswerRadio); Assert.Equal(testData[0].Questions[0].Choices[0].QuestionId, _context.Tests.FirstOrDefault().Questions[0].Choices[0].QuestionId); Assert.Equal(testData[0].Questions[0].Choices[0].ChoiceText, _context.Tests.FirstOrDefault().Questions[0].Choices[0].ChoiceText); Assert.Equal(testData[0].Questions[0].Choices[0].QuestionId, _context.Choices.FirstOrDefault().QuestionId); Assert.Equal(testData[0].Questions[0].Choices[0].IsAnswer, _context.Choices.FirstOrDefault().IsAnswer); }
private void Update() { // Do this work in the background to avoid a possible deadlock acquiring the report lock // on the UI thread. taskManager.ClearQueue(QueueId); taskManager.QueueTask(QueueId, new DelegateCommand((pm => testController.ReadReport(report => { TestModelData = report.TestModel; var testStepRuns = new List <TestStepRun>(); if (report.TestPackageRun != null) { foreach (var testStepRun in report.TestPackageRun.AllTestStepRuns) { if (RelevantStep(testStepRun)) { testStepRuns.Add(testStepRun); } } } EventHandlerPolicy.SafeInvoke(ExecutionLogUpdated, this, new ExecutionLogUpdatedEventArgs(testStepRuns)); })))); }
public static void AreEqual(TestModelData expected, TestModelData actual) { if (expected == null) { Assert.IsNull(actual); return; } AreEqual(expected.RootTest, actual.RootTest); }
private TestModelData MergeTestModelData() { var merged = new TestModelData(); foreach (Report report in reports) { merged.MergeWith(report.TestModel); } return(merged); }
public void GetAndSetTestModel() { Report report = new Report(); Assert.IsNull(report.TestModel); TestModelData value = new TestModelData(); report.TestModel = value; Assert.AreSame(value, report.TestModel); }
public static void CreateExcelFile(string OutPutFileDirectory) { TestModelList data = TestModelData.GetList(); var fileFullname = Path.Combine(OutPutFileDirectory, $"output_{GetTimestamp()}.xlsx"); using (SpreadsheetDocument package = SpreadsheetDocument.Create(fileFullname, SpreadsheetDocumentType.Workbook)) { CreatePartsForExcel(package, data); } }
public TestTreeNode BuildTree(IProgressMonitor progressMonitor, TestModelData testModelData, TreeBuilderOptions options) { var root = new TestDataNode(testModelData.RootTest); progressMonitor.Worked(1); PopulateNamespaceTree(progressMonitor, testModelData.RootTest.Children, root, options); return(root); }
public void Access_TestEdited_Check_WhenIdDifferentPostedData_BeNotFound() { var testData = TestModelData.TestData(); var options = new DbContextOptionsBuilder <TestMakerContext>() .UseInMemoryDatabase(databaseName: "Access_TestEdited_Check_WhenIdDifferentPostedData_BeNotFound") .Options; using var _context = new TestMakerContext(options); ITestRepository testRepository = new TestRepository(_context); var controller = new TestController(testRepository); var actionResult = controller.Edit(999999, testData[0]); Assert.IsType <NotFoundResult>(actionResult); }
public void Access_TestCreated_check_RedirectToActionResult() { var testData = TestModelData.TestData(); var options = new DbContextOptionsBuilder <TestMakerContext>() .UseInMemoryDatabase(databaseName: "Access_TestCreated_check_viewData") .Options; using var _context = new TestMakerContext(options); ITestRepository testRepository = new TestRepository(_context); var controller = new TestController(testRepository); var actionResult = controller.Create(testData[0]) as RedirectToActionResult; Assert.Equal("Index", actionResult.ActionName); Assert.Equal("Home", actionResult.ControllerName); }
private static Report CreateReport(CodeLocation codeLocation) { var root = new TestData("root", "root", "root"); var testData = new TestData(testId, "name", "fullName") { CodeLocation = codeLocation }; root.Children.Add(testData); var testModelData = new TestModelData(root); return(new Report { TestModel = testModelData }); }
public TestTreeNode BuildTree(IProgressMonitor progressMonitor, TestModelData testModelData, TreeBuilderOptions options) { var root = new TestDataNode(testModelData.RootTest); progressMonitor.Worked(1); foreach (var childTestData in testModelData.RootTest.Children) { PopulateMetadataTree(progressMonitor, options.TreeViewCategory, childTestData, null, root); } return(root); }
public FileInfo Format(ICollection <TestStepRun> stepRuns, TestModelData modelData, bool recurse) { cacheGroup.Create(); var htmlFile = reportFilePool.GetNext(); var fileStream = htmlFile.Open(FileMode.Create, FileAccess.Write, FileShare.ReadWrite | FileShare.Delete); using (var htmlFileWriter = new StreamWriter(fileStream, new UTF8Encoding(false))) { Format(htmlFileWriter, stepRuns, modelData, recurse); } return(htmlFile); }
public void Access_TestCreated_Check_GivenInvalidModel() { var testData = TestModelData.TestData(); var options = new DbContextOptionsBuilder <TestMakerContext>() .UseInMemoryDatabase(databaseName: "Access_TestCreated_Check_GivenInvalidModel") .Options; using var _context = new TestMakerContext(options); ITestRepository testRepository = new TestRepository(_context); var controller = new TestController(testRepository); controller.ModelState.AddModelError("error", "some error"); var view = controller.Create(testData[0]) as ViewResult; Assert.Equal(testData[0].Title, view.ViewData["Title"]); Assert.Equal(testData[0].Number, view.ViewData["Number"]); }
public void Access_TestDeleteConfirmed_Check_db() { var testData = TestModelData.TestData(); var options = new DbContextOptionsBuilder <TestMakerContext>() .UseInMemoryDatabase(databaseName: "Access_TestDeleteConfirmed_Check_db") .Options; using var _context = new TestMakerContext(options); _context.Tests.Add(testData[0]); _context.SaveChanges(); Assert.Equal(1, _context.Tests.Count()); ITestRepository testRepository = new TestRepository(_context); var controller = new TestController(testRepository); controller.DeleteConfirmed(1); Assert.Equal(0, _context.Tests.Count()); }
private void SetupAnnotationData(AnnotationType annotationType) { var testModelData = new TestModelData(); testModelData.Annotations.Add(new AnnotationData(annotationType, CodeLocation.Unknown, new CodeReference(), "message", "details")); var report = new Report { TestModel = testModelData }; testController .Stub(x => x.ReadReport(null)) .IgnoreArguments() .Repeat.Any() .Do((Action <ReadAction <Report> >)(action => action(report))); }
public void Access_TestScore_Check_SingleCorrectResult() { var testData = TestModelData.TestDataForScoreSingleCorrectCheck(); var options = new DbContextOptionsBuilder <TestMakerContext>() .UseInMemoryDatabase(databaseName: "Access_TestScore_Check_SingleCorrectResult1") .Options; using var _context = new TestMakerContext(options); _context.Tests.Add(testData); _context.SaveChanges(); ITestRepository testRepository = new TestRepository(_context); var controller = new TestController(testRepository); var view = controller.Score(1, testData) as ViewResult; Assert.Equal(1, view.ViewData["CorrectCount"]); Assert.Equal("Score", view.ViewData["Score"]); Assert.Equal("Details", view.ViewName); }
/// <summary> /// Displays information about a set of test step runs, using additional /// information from the test model when available. /// </summary> /// <param name="testStepRuns">The test step runs.</param> /// <param name="testModelData">The test model data, or null if not available.</param> /// <param name="recurse">Show child test results recursively</param> public void Show(ICollection <TestStepRun> testStepRuns, TestModelData testModelData, bool recurse) { if (testStepRuns == null || testStepRuns.Contains(null)) { throw new ArgumentNullException("testStepRuns"); } if (testStepRuns.Count == 0) { ClearNoUpdate(); } else { EnsureFormatter(); htmlFile = formatter.Format(testStepRuns, testModelData, recurse); } UpdateAsync(); }
public void Access_TestIndex_db() { var testData = TestModelData.TestData(); var options = new DbContextOptionsBuilder <TestMakerContext>() .UseInMemoryDatabase(databaseName: "Access_TestIndex_db") .Options; using var _context = new TestMakerContext(options); foreach (var t in testData) { _context.Tests.Add(t); } _context.Users.Add(testData[0].User); _context.SaveChanges(); ITestRepository testRepository = new TestRepository(_context); var testInfoTest = testRepository.GetAll(1); Assert.Equal(testData[0].TestId, testInfoTest.FirstOrDefault().TestId); Assert.Equal(testData[0].Title, testInfoTest.FirstOrDefault().Title); Assert.Equal(testData[0].CreatedTime, testInfoTest.FirstOrDefault().CreatedTime); Assert.Equal(testData[0].UpdatedTime, testInfoTest.FirstOrDefault().UpdatedTime); Assert.Equal(testData[0].UserId, testInfoTest.FirstOrDefault().UserId); Assert.Equal(testData[0].Questions[0].QuestionText, testInfoTest.FirstOrDefault().Questions[0].QuestionText); Assert.Equal(testData[0].Questions[0].TestId, testInfoTest.FirstOrDefault().Questions[0].TestId); Assert.Equal(testData[0].Questions[0].Choices[0].ChoiceId, testInfoTest.FirstOrDefault().Questions[0].Choices[0].ChoiceId); Assert.Equal(testData[0].Questions[0].Choices[0].ChoiceText, testInfoTest.FirstOrDefault().Questions[0].Choices[0].ChoiceText); Assert.Equal(testData[0].Questions[0].Choices[0].IsAnswer, testInfoTest.FirstOrDefault().Questions[0].Choices[0].IsAnswer); Assert.Equal(testData[0].Questions[0].Choices[0].IsUsersAnswerCheck, testInfoTest.FirstOrDefault().Questions[0].Choices[0].IsUsersAnswerCheck); Assert.Equal(testData[0].Questions[0].Choices[0].IsUsersAnswerRadio, testInfoTest.FirstOrDefault().Questions[0].Choices[0].IsUsersAnswerRadio); Assert.Equal(testData[0].Questions[0].Choices[0].QuestionId, testInfoTest.FirstOrDefault().Questions[0].Choices[0].QuestionId); Assert.Equal(testData[0].Questions[0].Choices[0].ChoiceText, testInfoTest.FirstOrDefault().Questions[0].Choices[0].ChoiceText); Assert.Equal(testData[0].User.LoginId, testInfoTest.FirstOrDefault().User.LoginId); Assert.Equal(testData[0].User.UserName, testInfoTest.FirstOrDefault().User.UserName); Assert.Equal(testData[0].User.Password, testInfoTest.FirstOrDefault().User.Password); Assert.Equal(testData[0].User.Salt, testInfoTest.FirstOrDefault().User.Salt); Assert.Equal(testData[0].User.SelfIntroduction, testInfoTest.FirstOrDefault().User.SelfIntroduction); Assert.Equal(testData[0].User.Icon, testInfoTest.FirstOrDefault().User.Icon); }
public void Access_TestDetails_db() { var testData = TestModelData.TestData(); var options = new DbContextOptionsBuilder <TestMakerContext>() .UseInMemoryDatabase(databaseName: "Access_TestDetails_db") .Options; using var _context = new TestMakerContext(options); _context.Tests.Add(testData[0]); foreach (var q in testData[0].Questions) { _context.Questions.Add(q); } foreach (var c in testData[0].Questions[0].Choices) { _context.Choices.Add(c); } _context.SaveChanges(); ITestRepository testRepository = new TestRepository(_context); var testInfoTest = testRepository.GetContent(o => o.TestId == 1); Assert.Equal(testData[0].TestId, testInfoTest.TestId); Assert.Equal(testData[0].Title, testInfoTest.Title); Assert.Equal(testData[0].CreatedTime, testInfoTest.CreatedTime); Assert.Equal(testData[0].UpdatedTime, testInfoTest.UpdatedTime); Assert.Equal(testData[0].UserId, testInfoTest.UserId); Assert.Equal(testData[0].Questions[0].QuestionText, testInfoTest.Questions[0].QuestionText); Assert.Equal(testData[0].Questions[0].TestId, testInfoTest.Questions[0].TestId); Assert.Equal(testData[0].Questions[0].Choices[0].ChoiceId, testInfoTest.Questions[0].Choices[0].ChoiceId); Assert.Equal(testData[0].Questions[0].Choices[0].ChoiceText, testInfoTest.Questions[0].Choices[0].ChoiceText); Assert.Equal(testData[0].Questions[0].Choices[0].IsAnswer, testInfoTest.Questions[0].Choices[0].IsAnswer); Assert.Equal(testData[0].Questions[0].Choices[0].IsUsersAnswerCheck, testInfoTest.Questions[0].Choices[0].IsUsersAnswerCheck); Assert.Equal(testData[0].Questions[0].Choices[0].IsUsersAnswerRadio, testInfoTest.Questions[0].Choices[0].IsUsersAnswerRadio); Assert.Equal(testData[0].Questions[0].Choices[0].QuestionId, testInfoTest.Questions[0].Choices[0].QuestionId); Assert.Equal(testData[0].Questions[0].Choices[0].ChoiceText, testInfoTest.Questions[0].Choices[0].ChoiceText); Assert.Equal(testData[0].Questions[0].Choices[0].QuestionId, testInfoTest.Questions[0].Choices[0].QuestionId); Assert.Equal(testData[0].Questions[0].Choices[0].IsAnswer, testInfoTest.Questions[0].Choices[0].IsAnswer); }
public void BuildTestTree(IProgressMonitor progressMonitor, TestModelData testModelData, TreeBuilderOptions options) { if (string.IsNullOrEmpty(options.TreeViewCategory)) { throw new ArgumentException("Tree view category cannot be null or empty."); } int count = CountTestData(testModelData.RootTest); using (progressMonitor.BeginTask("Building test tree", count)) { ((TreeModel)innerTreeModel).Root.Nodes.Clear(); TestTreeNode root = null; foreach (var treeBuilder in treeBuilders) { if (!treeBuilder.CanHandle(options.TreeViewCategory)) { continue; } root = treeBuilder.BuildTree(progressMonitor, testModelData, options); break; } if (root == null) { throw new Exception(string.Format("Could not find a tree builder for {0}", options.TreeViewCategory)); } ((TreeModel)innerTreeModel).Root.Nodes.Add(root); OnStructureChanged(new TreePathEventArgs(new TreePath(root))); } }
public void Handle(RunStarted @event) { TestModelData = null; EventHandlerPolicy.SafeInvoke(ExecutionLogReset, true, System.EventArgs.Empty); }
public FileInfo Format(ICollection <TestStepRun> stepRuns, TestModelData modelData) { return(Format(stepRuns, modelData, true)); }
public TestStepReportWriter(HtmlTestStepRunFormatter formatter, TextWriter writer, TestModelData testModelData) { this.formatter = formatter; this.writer = writer; this.testModelData = testModelData; }
private void Format(TextWriter writer, IEnumerable <TestStepRun> stepRuns, TestModelData modelData, bool recurse) { var reportWriter = new TestStepReportWriter(this, writer, modelData); reportWriter.RenderReport(stepRuns, recurse); }
private void Format(TextWriter writer, IEnumerable <TestStepRun> stepRuns, TestModelData modelData) { Format(writer, stepRuns, modelData, true); }
public void Adapter_GeneratesCorrectTestModel() { TestModelData testModel = Runner.Report.TestModel; Assert.Count(1, testModel.RootTest.Children, "Root test contain top level test."); TestData fileTest = testModel.RootTest.Children[0]; Assert.AreEqual("nested_example_groups_spec", fileTest.Name, "Top level test is named for the file."); Assert.EndsWith(fileTest.Metadata.GetValue(MetadataKeys.File), "nested_example_groups_spec.rb", "Top level test has correct file path metadata."); Assert.AreEqual("RSpec File", fileTest.Metadata.GetValue(MetadataKeys.TestKind), "Top level test should have correct kind."); Assert.Count(1, fileTest.Children, "Top level test contains example group."); TestData outerExampleGroupTest = fileTest.Children[0]; Assert.AreEqual("Outer", outerExampleGroupTest.Name, "Example group is named as in 'describe' syntax."); Assert.AreEqual("RSpec Example Group", outerExampleGroupTest.Metadata.GetValue(MetadataKeys.TestKind), "Example group test should have correct kind."); Assert.Count(4, outerExampleGroupTest.Children, "Example group test contains other example groups and examples."); TestData outerExample1Test = outerExampleGroupTest.Children[0]; Assert.AreEqual("Outer Example1", outerExample1Test.Name, "Example is named as in 'it' syntax."); Assert.AreEqual("RSpec Example", outerExample1Test.Metadata.GetValue(MetadataKeys.TestKind), "Example test should have correct kind."); TestData outerExample2Test = outerExampleGroupTest.Children[1]; Assert.AreEqual("Outer Example2", outerExample2Test.Name, "Example is named as in 'it' syntax."); Assert.AreEqual("RSpec Example", outerExample2Test.Metadata.GetValue(MetadataKeys.TestKind), "Example test should have correct kind."); TestData innerExampleGroup1Test = outerExampleGroupTest.Children[2]; Assert.AreEqual("Inner1", innerExampleGroup1Test.Name, "Example group is named as in 'describe' syntax."); Assert.AreEqual("RSpec Example Group", innerExampleGroup1Test.Metadata.GetValue(MetadataKeys.TestKind), "Example group test should have correct kind."); Assert.Count(2, innerExampleGroup1Test.Children, "Example group test contains other example groups and examples."); TestData inner1Example1Test = innerExampleGroup1Test.Children[0]; Assert.AreEqual("Inner1 Example1", inner1Example1Test.Name, "Example is named as in 'it' syntax."); Assert.AreEqual("RSpec Example", inner1Example1Test.Metadata.GetValue(MetadataKeys.TestKind), "Example test should have correct kind."); TestData inner1Example2Test = innerExampleGroup1Test.Children[1]; Assert.AreEqual("Inner1 Example2", inner1Example2Test.Name, "Example is named as in 'it' syntax."); Assert.AreEqual("RSpec Example", inner1Example2Test.Metadata.GetValue(MetadataKeys.TestKind), "Example test should have correct kind."); TestData innerExampleGroup2Test = outerExampleGroupTest.Children[3]; Assert.AreEqual("Inner2", innerExampleGroup2Test.Name, "Example group is named as in 'describe' syntax."); Assert.AreEqual("RSpec Example Group", innerExampleGroup2Test.Metadata.GetValue(MetadataKeys.TestKind), "Example group test should have correct kind."); Assert.Count(2, innerExampleGroup2Test.Children, "Example group test contains other example groups and examples."); TestData inner2Example1Test = innerExampleGroup2Test.Children[0]; Assert.AreEqual("Inner2 Example1", inner2Example1Test.Name, "Example is named as in 'it' syntax."); Assert.AreEqual("RSpec Example", inner2Example1Test.Metadata.GetValue(MetadataKeys.TestKind), "Example test should have correct kind."); TestData inner2Example2Test = innerExampleGroup2Test.Children[1]; Assert.AreEqual("Inner2 Example2", inner2Example2Test.Name, "Example is named as in 'it' syntax."); Assert.AreEqual("RSpec Example", inner2Example2Test.Metadata.GetValue(MetadataKeys.TestKind), "Example test should have correct kind."); }