<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[James's Programming Page — HidSharp mocking]]></title>
		<link>https://swforum.seekye.com/topic/10158/</link>
		<atom:link href="https://swforum.seekye.com/feed/rss/topic/10158/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in HidSharp mocking.]]></description>
		<lastBuildDate>Sat, 11 Jan 2025 20:45:09 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: HidSharp mocking]]></title>
			<link>https://swforum.seekye.com/post/13153/#p13153</link>
			<description><![CDATA[<p>Currently, for reference I had to create an interface with the methods I use, and then create a class to proxy the methods to the real class: github.com/forkeith/PlasmaTrimDotNet/blob/98bb37f80fbfda42837881a82a246533ea7855a8/HidProxy/ProxiedHidDevice.cs</p>]]></description>
			<author><![CDATA[null@example.com (kingkeith+zer7)]]></author>
			<pubDate>Sat, 11 Jan 2025 20:45:09 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/13153/#p13153</guid>
		</item>
		<item>
			<title><![CDATA[HidSharp mocking]]></title>
			<link>https://swforum.seekye.com/post/13152/#p13152</link>
			<description><![CDATA[<p>Hi,</p><p>Thanks for the great HidSharp library, I find it very useful. I am using it in one C# project to communicate with a specific device and want to be able to write unit tests for it. Unfortunately, the library currently makes use of concrete types with no interfaces. This makes it hard to mock/fake for testing.</p><p>Is there any chance an `IHidDevice` interface could be added to the NuGet package please? I would be happy to contribute it myself, if you are accepting outside contributions and can tell me how best to share my code with you, as it isn&#039;t hosted on GitHub.</p><p>I envisage something like this:</p><p>```<br />public interface IHidDevice<br />{<br />&nbsp; &nbsp; Stream Open();<br />&nbsp; &nbsp; int ProductID { get; }<br />&nbsp; &nbsp; int VendorID { get; }<br />}<br />```</p>]]></description>
			<author><![CDATA[null@example.com (kingkeith+zer7)]]></author>
			<pubDate>Sat, 11 Jan 2025 20:06:35 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/13152/#p13152</guid>
		</item>
	</channel>
</rss>
