public void SetUp()
 {
     _volumeSerial = 1;
     _environment  = Substitute.For <IEnvironment>();
     _kernel32     = Substitute.For <IKernel32>();
     _kernel32.GetSystemVolumeSerial().Returns(x => _volumeSerial);
 }
예제 #2
0
 public Win32FormatMessageService(IKernel32 api, IMarshaller marshaller)
 {
     this.api        = api ?? throw new ArgumentNullException(nameof(api));
     this.marshaller = marshaller ?? throw new ArgumentNullException(nameof(marshaller));
 }
예제 #3
0
 public MachineIdWrapper(IRegistry registry, IKernel32 kernel32)
 {
     _registry = registry;
     _kernel32 = kernel32;
 }
예제 #4
0
 public Keyboard(IUser32 user32, IKernel32 kernel32)
 {
     _user32 = user32;
     _kernel32 = kernel32;
     _keyboardCallback = KeyboardCallback;
 }
예제 #5
0
 public MachineIdGenerator(IEnvironment environment, IKernel32 kernel32)
 {
     _environment = environment;
     _kernel32    = kernel32;
 }