Exemplo n.º 1
0
        public void ModelItemToActivityConverter_ConvertBack_Null()
        {
            var converter = new ModelItemToActivityConverter();
            var actual    = converter.ConvertBack(null, null, null, null);

            Assert.IsNull(actual);
        }
Exemplo n.º 2
0
        public void ModelItemToActivityConverter_ConvertBack_SequenceActivity_Parameter_Resume()
        {
            var converter = new ModelItemToActivityConverter();

            var actual = converter.ConvertBack(null, null, "Resume", null);

            Assert.IsNotNull(actual);
            Assert.AreEqual(typeof(DsfSequenceActivity), actual.GetType());
        }
Exemplo n.º 3
0
        public void ModelItemToActivityConverter_ConvertBack_Activity()
        {
            var converter = new ModelItemToActivityConverter();

            var mockModelItem = new Mock <ModelItem>();
            var activity      = new DsfActivity();

            mockModelItem.Setup(o => o.GetCurrentValue()).Returns(activity);
            var actual = converter.ConvertBack(mockModelItem.Object, null, null, null);

            Assert.AreEqual(activity, actual);
        }
Exemplo n.º 4
0
        public void ModelItemToActivityConverter_Convert()
        {
            var converter        = new ModelItemToActivityConverter();
            var databaseActivity = new DsfDatabaseActivity();
            var mockModelItem    = new Mock <ModelItem>();

            mockModelItem.Setup(o => o.GetCurrentValue()).Returns(databaseActivity);

            var actual = converter.Convert(mockModelItem.Object, null, null, null);

            Assert.IsNotNull(actual);
        }