Ejemplo n.º 1
0
        public void CreatSuccess()
        {
            mockService.Setup(_ => _.Create(It.IsAny <CreateLiveParameter>())).Returns(BaseMockResponse.SuccessResponse());
            var result = mockService.Object.Create(LiveMockParameter.CreateLiveParameter());

            Assert.NotNull(result);
        }
Ejemplo n.º 2
0
 public void CreateFail()
 {
     foreach (var statusCode in this.StatusCodes)
     {
         mockService.Setup(_ => _.Create(It.IsAny <CreateLiveParameter>())).Throws(BaseMockResponse.ErrorResponse(statusCode));
         var ex = Assert.Throws <UizaException>(() => mockService.Object.Create(LiveMockParameter.CreateLiveParameter()));
         Assert.Equal(statusCode, ex.UizaInnerException.Code);
     }
 }