Beispiel #1
0
        public object Create(object toCreate)
        {
            RepositoryService svc       = GetService(toCreate);
            CreateOperation   operation = CreateOperation.For(toCreate);

            return(svc.Create(operation));
        }
        public void CreateOperationForSetsKeys()
        {
            AssemblyQualifiedTypeDescriptor typeDescriptor = new AssemblyQualifiedTypeDescriptor();
            CreateOperation createOperation = CreateOperation.For(typeDescriptor);

            Expect.IsGreaterThan(createOperation.Properties.Count, 0, "Property count should have been greater than 0");
            Expect.IsFalse(createOperation.Properties.Any(p => string.IsNullOrEmpty(p.InstanceIdentifier)));
            createOperation.Properties.All(p => p.InstanceIdentifier.Equals(typeDescriptor.Key().ToString())).IsTrue("The keys set did not match the expected value");
        }