Beispiel #1
0
            public void SubDirectory_Should_ContainDirectories()
            {
                var directoryFixture = DirectoryFixture.CreateUniqueDirectoryIn(AtataContext.Current.Artifacts.FullName)
                                       .CreateDirectories("dir1", "dir2");

                using (directoryFixture)
                    AtataContext.Current.Artifacts.Directories[directoryFixture.DirectoryName]
                    .Should.ContainDirectories("dir1", "dir2");
            }
        public void ConfigureWithFolderPath()
        {
            using var directoryFixture = DirectoryFixture.CreateUniqueDirectory();

            ConfigureBaseAtataContext()
            .AddNLogFileLogging()
            .WithFolderPath(directoryFixture.DirectoryPath)
            .Build();

            WriteLogMessageAndAssertItInFile(
                Path.Combine(directoryFixture.DirectoryPath, NLogFileConsumer.DefaultFileName));
        }
        public void ConfigureWithFilePath()
        {
            using var directoryFixture = DirectoryFixture.CreateUniqueDirectory();
            string filePath = Path.Combine(directoryFixture.DirectoryPath, "test.log");

            ConfigureBaseAtataContext()
            .AddNLogFileLogging()
            .WithFilePath(filePath)
            .Build();

            WriteLogMessageAndAssertItInFile(filePath);
        }
        public void ConfigureWithFilePathThatContainsVariables()
        {
            using var directoryFixture = DirectoryFixture.CreateUniqueDirectory();
            string filePath = Path.Combine(directoryFixture.DirectoryPath, "{test-name-sanitized}-{driver-alias}", "test.log");

            ConfigureBaseAtataContext()
            .AddNLogFileLogging()
            .WithFilePath(filePath)
            .Build();

            WriteLogMessageAndAssertItInFile(
                Path.Combine(directoryFixture.DirectoryPath, $"{AtataContext.Current.TestNameSanitized}-{AtataContext.Current.DriverAlias}", "test.log"));
        }
 public StreamExistenceFilterTests(DirectoryFixture <StreamExistenceFilterTests> fixture)
 {
     _fixture = fixture;
     Sut      = GenSut();
     Sut.Initialize(new MockExistenceFilterInitializer(), 0);
 }