Skip to content

Instantly share code, notes, and snippets.

@Clancey
Created March 9, 2018 00:44
Show Gist options
  • Save Clancey/618a01a82c5cba2f8a63d6defec388f3 to your computer and use it in GitHub Desktop.
Save Clancey/618a01a82c5cba2f8a63d6defec388f3 to your computer and use it in GitHub Desktop.
[assembly: Dependency(typeof(DeviceInfo))]
namespace HockeyApp.Helpers
{
public class DeviceInfo : IDeviceInfo
{
public static Mock<IDeviceInfo> Mocked { get; set; }
public string Model => Mocked?.Object?.Model ?? throw new NotImplementedException();
public string Version => Mocked?.Object?.Version ?? throw new NotImplementedException();
public string Id => Mocked?.Object?.Id ?? throw new NotImplementedException();
public ConfigurationModes ConfigurationMode => Mocked?.Object?.ConfigurationMode ?? throw new NotImplementedException();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment