Esempio n. 1
0
 [TestCase(PlatformID.WinCE)]        // No plans for support.
 public void Platform_Unsupported(PlatformID platform)
 {
     // Arrange
     // Act
     // Assert
     Assert.Catch <PlatformNotSupportedException>(() => LibraryLoaderFactory.Create(platform));
 }
Esempio n. 2
0
        private static IEnumerable <ILibraryLoader> GetLibraryLoaders()
        {
            yield return(LibraryLoaderFactory.Create());

            if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
            {
                yield return(new UnixDl2LibraryLoader());
            }
        }
Esempio n. 3
0
        public void UnixPlatform_ThrowsPlatformNotSupportedException()
        {
            // Arrange

            // Act
            var result = LibraryLoaderFactory.Create(PlatformID.MacOSX);

            // Assert
            Assert.IsInstanceOf <UnixLibraryLoader>(result);
        }
Esempio n. 4
0
        public void WindowsPlatform_ReturnsWindowsImplementation()
        {
            // Arrange

            // Act
            var result = LibraryLoaderFactory.Create(PlatformID.Win32NT);

            // Assert
            Assert.IsInstanceOf <WindowsLibraryLoader>(result);
        }
Esempio n. 5
0
 public LibraryLoaderFactoryTest()
 {
     _sut = new LibraryLoaderFactory();
 }