[TestCase(PlatformID.WinCE)] // No plans for support. public void Platform_Unsupported(PlatformID platform) { // Arrange // Act // Assert Assert.Catch <PlatformNotSupportedException>(() => LibraryLoaderFactory.Create(platform)); }
private static IEnumerable <ILibraryLoader> GetLibraryLoaders() { yield return(LibraryLoaderFactory.Create()); if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { yield return(new UnixDl2LibraryLoader()); } }
public void UnixPlatform_ThrowsPlatformNotSupportedException() { // Arrange // Act var result = LibraryLoaderFactory.Create(PlatformID.MacOSX); // Assert Assert.IsInstanceOf <UnixLibraryLoader>(result); }
public void WindowsPlatform_ReturnsWindowsImplementation() { // Arrange // Act var result = LibraryLoaderFactory.Create(PlatformID.Win32NT); // Assert Assert.IsInstanceOf <WindowsLibraryLoader>(result); }
public LibraryLoaderFactoryTest() { _sut = new LibraryLoaderFactory(); }