Exemplo n.º 1
0
        public void Should_generate_plugin_context_from_a_serialised_profile()
        {
            var ctx = new XrmRealContext();
            //var serialised = @"7R1rc9u48Xt/BavOZHLTo0hKsiQrim5ysdNqGseeyLne3JcrCCwl1CTBgpBt+dcX4EtPW6RjUTKjGY9tvPeFxWKBBfu/3Huudgs8pMx/X7PqZk0DHzNC/fH72rfrT3q3pv0y6H+FgHGhycp+2KPvaxMhgp5h3N3d1e+adcbHRsM0LeP3i88jPAEP6dQPBfIx1Ab9j8x36HjKkZBjaLTnU/d9TfAp1IyoMJT/Y8H4WVJl6F9Q16UhYOaTcGD2je2VFvs5v8cQbBlrJBAX19SDQcO0OrrZ0M3udaPRO+n0rGa93Wp0rcYfSwPPW6h+BNyLwRtXvMtFvzdj8U5Vfughf3Y9C0BCJuSf97Urdzqm/vk94KmCOOm5lhD6ISN0GFE1rHsUcxYyR9Qx8xTNm4ZlGiPgFLn0IaKMUXsOm1IQf52G1Icw/OZTMSQq97QLXcdxmjoB3NGhbVl61wSkn5jtE6fZtZvttqVaGutNVfZHxjm4Mc+iTEIAdbrQ0du4g/RWBzs6QhjrnVNC2paNT22nFfW31lLlnknWTlQiHjNLqtRQDkxlfX/8LQQetzFbuIW6jaZuEwvrLdsEvds6VXggs9FuNBR2UU+bGsedBlNxhTjyQEg2J7RFWzhzzxV3LEtJkOAIizDlir3WkiCBcFIt5VHLMDvGaBYK8OofmesCVmQI6/8AX/IaZ+xCvX/B7DfkTuEKUX7pSGmVGCRSllayezcwU4lrxMcgInSzvLjCreoik0rUO/cFFbOFYT4I2bM9FRA+b2hJO07lNJrJuQF5ILiMpvAIRDTEAiRRei4BCxlJt7dL6VxgFsPFC8nM/1Py6xZcPIloqqq9CFLtU/O0Y8p5vS/kECFcTuLGn+GEBoGsKOV+wkgF2CaVDJtKuSbb8XjojaeURNCTxql10iWgn1gAqfpzzLn6O+lYZWHgSE3A7qTSoO52HHDPZswF5KeaB29fDyKM1XJZFkaE+UzYU/dm10g5yA3LxSoEn3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y+8N2icwmV04ewTiGYEnBUpObr/JHimV9S2Fm3zuipcLUA5nxR7Jk9nDUMT03tsacYrzOdSJ82jq+5K5Z1PfkaIOZ8CjW5RbWXvwLfkpkukUycRPkUyvGMlk27hrmoapAqqDaplSu7aQEA/B1zpqNtr1zJd6ShnJdGn+Vwwk55SjDF3fARc8jlIteYpTOhLwTnFKpzilHyVOaYNeGXExLUN5i4yANB2J6mIHa01qm5qkH7GVOeEncsOP4fbTuKgtn+it9bVdVeZ9pMGhg+/eBHmWA5aS5vWUi1Q8f2dudWTdVoee4AuxVkK0FprcTEigiB/kKchFj4JJCqQfCmZIwGApNqOughQ/7OSv7/72cPbhL4qiIK48HbZajQaE98MRsDuC4YrRO2IBU4Ll9E+LfUZtk+jWajJAkrHc9VBQmXnIeT/i1L9HHE+U8PfPynL9RBZw9He1OP6OMwv//KxEa5hClmznJPsdcv0PomogJlkewH9FAfzHSGlyo9DUaNwM1CvAHMO3IGJzCZpLVcavPm+o3/8nCmLennuWT4nHv1GeegLiooGcen0tW93+MIgRFwiKDcEg3Cj0tdXs/tI2QE6j5Yx+akHLSTmIaNbXlnP7MUljE2RgVI2+tpLXjwY8vxMaYfvKsFW/b5YK+d1tsR5NGTz5GXAJpFynBk9PtL6WVuz/O3agZY0yfAbgyRCZ9wAvGGMkzM6htUoXLRL+wf8B";

            Assert.DoesNotThrow(() => ctx.GetContextFromSerialisedCompressedProfile(serialised));

            var pluginProfile = ctx.GetContextFromSerialisedCompressedProfile(serialised);

            Assert.NotEqual(0, pluginProfile.Stage);
        }