Ejemplo n.º 1
0
        public void TestGetErrorsByOperationIndexWithErrors()
        {
            GoogleAdsFailure failure = new GoogleAdsFailure();

            failure.Errors.Add(OPERATIONS_2_NAME);

            // There are no errors for index = 0.
            Assert.AreEqual(failure.GetErrorsByOperationIndex(0).ToList().Count, 0);

            // There is one error for index = 2.
            Assert.AreEqual(failure.GetErrorsByOperationIndex(2).ToList().Count, 1);
        }
Ejemplo n.º 2
0
        public void TestGetErrorsByOperationIndexNoOperationIndex()
        {
            GoogleAdsFailure failure = new GoogleAdsFailure();

            failure.Errors.AddRange(new GoogleAdsError[] { OPERATIONS_NAME });
            Assert.AreEqual(failure.GetErrorsByOperationIndex(0).ToList().Count, 0);
        }
Ejemplo n.º 3
0
        public void TestGetErrorsByOperationIndexNoLocation()
        {
            GoogleAdsFailure failure = new GoogleAdsFailure();

            failure.Errors.Add(new GoogleAdsError());
            Assert.AreEqual(failure.GetErrorsByOperationIndex(0).ToList().Count, 0);
        }
Ejemplo n.º 4
0
        public void TestGetErrorsByOperationIndexWhenNoErrors()
        {
            GoogleAdsFailure failure = new GoogleAdsFailure();

            Assert.AreEqual(failure.GetErrorsByOperationIndex(0).ToList().Count, 0);
        }