void ExecuteTest(
            VcsRunbook runbook,
            RunbookProcess process,
            [CallerMemberName]
            string?testName = null
            )
        {
            var model = new VcsRunbookPersistenceModel(runbook)
            {
                Process = process
            };
            var ocl = Serialize(model);

            this.Assent(ocl, testName: testName);

            var result = Deserialize(ocl);

            result.Should()
            .BeEquivalentTo(
                model,
                config => config.IncludingAllDeclaredProperties()
                // v5 of Fluent assertions should provide us the property info directly
                .Excluding(i => ExcludePropertyFromAssertion(i.SelectedMemberInfo.DeclaringType.GetProperty(i.SelectedMemberInfo.Name) !)
                           )
                );
        }
Esempio n. 2
0
            public (RunbookProcess process, IReadOnlyList <IOclElement> notFound) FromDocument(
                OclConversionContext context,
                OclDocument doc
                )
            {
                var runbook = new RunbookProcess("PLACEHOLDER", "PLACEHOLDER");

                var properties = GetProperties(typeof(RunbookProcess)).ToArray();
                var notFound   = SetProperties(context, doc, runbook, properties);

                return(runbook, notFound);
            }