public static void Main() { Console.WriteLine("Enter a number"); int x = Convert.ToInt32(Console.ReadLine()); Console.WriteLine(); Console.WriteLine("Optional: Enter another number (you may leave this blank)"); var y = Console.ReadLine(); Console.WriteLine(); int value; bool parseSuccess = int.TryParse(y, out value); //Console.WriteLine($"value = {value}"); //Console.WriteLine($"y = {y}"); //Console.WriteLine($"x = {x}"); //Console.WriteLine(); OptOut.MyMath(x, value); Console.WriteLine($"The total of {x} + {y} = {OptOut.MyMath(x, value)}"); Console.ReadLine(); }
public void Given() { const string username = "******"; const string password = "******"; _optOutId = Guid.NewGuid(); _receivedAt = DateTime.UtcNow; _accountReference = "EX0123456"; _phoneNumber = "44123456789"; var data = new { Id = _optOutId, ReceivedAt = _receivedAt, AccountReference = _accountReference, From = new { PhoneNumber = _phoneNumber } }; MockApi.SetEndpoint(new MockEndpoint(200, JsonConvert.SerializeObject(data), "application/json")); var optOutClient = new OptOutsService(MockApi.Url, new EsendexCredentials(username, password)); _result = optOutClient.GetById(_optOutId); _request = MockApi.LastRequest; }
public PairingReceiverEmail(IServiceProvider services) { entries = services.GetService <IEntryRepository>(); links = services.GetService <LinkProvider>(); feedbackRequest = services.GetService <FeedbackRequest>(); personalMessage = services.GetService <PersonalMessage>(); optOut = services.GetService <OptOut>(); }