Ejemplo n.º 1
0
        public void Send_PostMuiltipleSms()
        {
            // Act
            var injectOptions = new InjectOptions();

            var controller = new SendController(
                injectOptions.Authentication,
                injectOptions.GenerateQueryString,
                injectOptions.GenerateUrl,
                injectOptions.SmsRequest,
                injectOptions.SmsLogger);

            // Arrange
            var body = new List <SmsModel>
            {
                new SmsModel()
                {
                    Message = "message 1 " + DateTime.Now.ToString("yyyyMMddhhsss"), Number = "27831111111"
                },
                new SmsModel()
                {
                    Message = "message 2 " + DateTime.Now.ToString("yyyyMMddhhsss"), Number = "27831111111"
                }
            };
            var response = controller.Post(body);

            // Assert
            Assert.IsTrue(response != "");
            Assert.IsTrue(response.Length > 10);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Reset the object to init state.
 /// </summary>
 public void Reset()
 {
     Tag = null;
     // ClientSocket = null;
     // ClientID = default(long);
     IPEndPoint = null;
     ReceiveBuffer?.Clear();
     SendBuffer?.Clear();
     RecvSpeedController?.Reset();
     SendController?.Reset();
 }
Ejemplo n.º 3
0
 private void Awake()
 {
     _sendController = GetComponent <SendController>();
 }