public void IgnoresEmailIfNullOrEmpty() { var coreSettings = new CoreSettings { EnableAutomaticReports = true }; var endpoint = Substitute.For<IAnalyticsEndpoint>(); var client = new AnalyticsClient(endpoint); client.Initialize(coreSettings); client.RecordBugReport("blabla"); endpoint.DidNotReceiveWithAnyArgs().UpdateEmail(Arg.Any<string>()); client.RecordBugReport("blabla", String.Empty); endpoint.DidNotReceiveWithAnyArgs().UpdateEmail(Arg.Any<string>()); client.RecordBugReport("blabla", " "); endpoint.DidNotReceiveWithAnyArgs().UpdateEmail(null); }
public void UpdatesEmailIfSet() { var coreSettings = new CoreSettings { EnableAutomaticReports = true }; var endpoint = Substitute.For<IAnalyticsEndpoint>(); var client = new AnalyticsClient(endpoint); client.Initialize(coreSettings); client.RecordBugReport("blabla", "*****@*****.**"); endpoint.Received().UpdateEmail("*****@*****.**"); }