Esempio n. 1
0
 public void The_EntityContainer_class_exposes_an_AddTo_method()
 {
     EntityContainerType.Should().HaveMethod(
         CSharpAccessModifiers.Public,
         typeof(void),
         "AddTo" + _navigationProperty.Name,
         new[] { _navTargetConcreteType });
 }
 public void It_has_a_Context_Property()
 {
     EntityContainerType.Should().HaveProperty(
         CSharpAccessModifiers.Public,
         CSharpAccessModifiers.Private,
         typeof(DataServiceContextWrapper),
         "Context");
 }
 public void The_EntityContainer_class_exposes_a_readonly_ConcreteInterface_property()
 {
     EntityContainerType.Should().HaveProperty(
         CSharpAccessModifiers.Public,
         CSharpAccessModifiers.Private,
         NavTargetFetcherInterface,
         NavigationProperty.Name,
         "Because Entity types should be accessible through their related Entity types.");
 }
 public void The_EntityContainer_class_exposes_the_async_method()
 {
     EntityContainerType.Should().HaveMethod(
         CSharpAccessModifiers.Public,
         true,
         _expectedReturnType,
         _expectedMethodName,
         GetMethodParameterTypes());
 }
Esempio n. 5
0
        public void The_EntityContainer_class_has_the_renamed_property()
        {
            bool isCollection = _property.IsCollection;

            EntityContainerType.Should().HaveProperty(
                CSharpAccessModifiers.Public,
                isCollection ? (CSharpAccessModifiers?)null : CSharpAccessModifiers.Private,
                Proxy.GetInterface(_property.Type.Namespace, "I" + _property.Type.Name + (isCollection ? "Collection" : "Fetcher")),
                GetPascalCaseName(_property));
        }
        public void The_EntityContainer_class_has_the_renamed_property()
        {
            bool isCollection = _property.IsCollection;
            var  propertyType = _property.Projection.Type;
            var  identifier   = isCollection
                ? NamesService.GetCollectionInterfaceName(propertyType)
                : NamesService.GetFetcherInterfaceName(propertyType);

            EntityContainerType.Should().HaveProperty(
                CSharpAccessModifiers.Public,
                isCollection ? (CSharpAccessModifiers?)null : CSharpAccessModifiers.Private,
                Proxy.GetInterface(_property.Type.Namespace, identifier.Name),
                GetPascalCaseName(_property));
        }
 public void The_EntityContainer_class_does_not_have_the_original_property_deprecated()
 {
     EntityContainerType.Should().NotHaveProperty(_property.Name);
 }
 public void It_has_an_EntityContainer_Constructor()
 {
     EntityContainerType.Should().HaveConstructor(
         CSharpAccessModifiers.Public,
         GetEntityContainerConstructorParameterTypes());
 }
 public void It_implements_the_container_interface()
 {
     EntityContainerType.Should().Implement(EntityContainerInterface);
 }
Esempio n. 10
0
 public void It_has_the_right_namespace_and_name()
 {
     EntityContainerType
     .Should().NotBeNull();
 }