Пример #1
0
        public void WhenNamespaceFileDoesNotExistProvidedNamespaceIsReturned()
        {
            var namespaceProvider = new NamespaceProvider(TestNamespace, Guid.NewGuid().ToString());
            var ns = namespaceProvider.GetNamespace();

            Assert.Equal(TestNamespace, ns);
        }
Пример #2
0
        public void WhenNamespaceFileExistsNamespaceContainedInThatFileIsReturned()
        {
            const string fileNamespace     = "file-ns";
            var          namespaceFilePath = Path.GetTempFileName();

            File.WriteAllText(namespaceFilePath, fileNamespace);
            var namespaceProvider = new NamespaceProvider(TestNamespace, namespaceFilePath);
            var ns = namespaceProvider.GetNamespace();

            Assert.Equal(fileNamespace, ns);
        }