public void Discovers_source_location() { RegisterStepDefinitionBinding(); StubSymbolReader.SetNextSymbol(@"C:\Temp\MyFile.cs", 12, 3); var sut = CreateSut(); var result = sut.DiscoverInternal(GetTestAssemblyPath(), null); result.StepDefinitions.Should().HaveCount(1); result.StepDefinitions[0].SourceLocation.Should().NotBeNullOrEmpty(); result.StepDefinitions[0].SourceLocation.Should().Contain("|12|3"); }
public void Collects_source_files() { RegisterStepDefinitionBinding(); StubSymbolReader.SetNextSymbol(@"C:\Temp\MyFile.cs", 12, 3); RegisterStepDefinitionBinding(); StubSymbolReader.SetNextSymbol(@"C:\Temp\MyFile.cs", 16, 5); RegisterStepDefinitionBinding(); StubSymbolReader.SetNextSymbol(@"C:\Temp\OtherFile.cs", 12, 3); var sut = CreateSut(); var result = sut.DiscoverInternal(GetTestAssemblyPath(), null); result.StepDefinitions.Should().HaveCount(3); result.StepDefinitions.Should().OnlyContain(sd => sd.SourceLocation.StartsWith("#0|") || sd.SourceLocation.StartsWith("#1|")); result.SourceFiles.Should().ContainKeys("0", "1"); result.SourceFiles.Should().ContainValues(@"C:\Temp\MyFile.cs", @"C:\Temp\OtherFile.cs"); }