Exemplo n.º 1
0
        public void TRexEditDataRequestValidation_Errors(string projectUid, string assetUid, DateTime startUtc, DateTime endUtc, string machineDesignName, int?liftNumber,
                                                         int expectedCode, string expectedMessage)
        {
            var request = new TRexEditDataRequest(Guid.Parse(projectUid), Guid.Parse(assetUid), startUtc.ToUniversalTime(), endUtc.ToUniversalTime(), machineDesignName, liftNumber);
            var ex      = Assert.Throws <ServiceException>(() => request.Validate());

            Assert.Equal(expectedCode, ex.GetResult.Code);
            Assert.Equal(expectedMessage, ex.GetResult.Message);
        }
Exemplo n.º 2
0
        public void TRexEditDataRequestValidation_HappyPath(string projectUid, string assetUid, DateTime startUtc, DateTime endUtc, string machineDesignName, int?liftNumber)
        {
            var request = new TRexEditDataRequest(Guid.Parse(projectUid), Guid.Parse(assetUid), startUtc, endUtc, machineDesignName, liftNumber);

            request.Validate();
        }