예제 #1
0
 public void The_Fetcher_class_exposes_a_readonly_Fetcher_Interface_property_with_default_projection()
 {
     FetcherType.Should().HaveProperty(
         CSharpAccessModifiers.Public,
         null,
         NavTargetFetcherInterface,
         NavigationProperty.Name);
 }
 public void The_Fetcher_class_exposes_a_readonly_CollectionInterface_property()
 {
     FetcherType.Should().HaveProperty(
         CSharpAccessModifiers.Public,
         null,
         _navTargetCollectionInterface,
         _navigationProperty.Name);
 }
 public void The_Fetcher_class_exposes_the_async_method()
 {
     FetcherType.Should().HaveMethod(
         CSharpAccessModifiers.Public,
         true,
         _expectedReturnType,
         _expectedMethodName,
         GetMethodParameterTypes());
 }
 public void The_Fetcher_class_implements_a_new_async_ExecuteAsync_method()
 {
     FetcherType.Should().HaveMethod(
         CSharpAccessModifiers.Public,
         true,
         typeof(Task <>).MakeGenericType(ConcreteInterface),
         "ExecuteAsync",
         new System.Type[0],
         "Because it allows executing queries.");
 }
예제 #5
0
        public void When_collection_valued_nav_prop_Then_Fetcher_class_exposes_a_readonly_property_with_projected_CollectionInterface()
        {
            Init(true);

            FetcherType.Should().HaveProperty(
                CSharpAccessModifiers.Public,
                null,
                m_NavTargetCollectionInterface,
                NavigationProperty.Name);
        }
예제 #6
0
 public void The_fetcher_proxy_class_implements_multiple_fetcher_interfaces()
 {
     foreach (var projectionFetcherPair in m_projectionFetcherCollectionMap)
     {
         var fetcherInterface = projectionFetcherPair.Value.Item1;
         FetcherType
         .Should()
         .Implement(fetcherInterface,
                    "Because the implementation is internal and only accessible via the interface.");
     }
 }
 public void The_Fetcher_class_does_not_expose_a_SaveChangesAsync_Method()
 {
     FetcherType.Should()
     .NotHaveMethod("SaveChangesAsync", "Because abstract Entities cannot be changed");
 }
 public void The_Fetcher_class_does_not_expose_a_DeleteAsync_Method()
 {
     FetcherType.Should()
     .NotHaveMethod("DeleteAsync", "Because abstract Entities cannot be deleted");
 }
 public void The_Fetcher_class_does_not_expose_an_Expand_Method()
 {
     FetcherType.Should()
     .NotHaveMethod("Expand", "Because abstract Entities cannot be queried");
 }
예제 #10
0
 public void The_Fetcher_class_derives_from_Base_Fetcher_class()
 {
     FetcherType.Should().BeDerivedFrom(_baseFetcherType);
 }
 public void The_fetcher_proxy_class_implements_the_Fetcher_Interface()
 {
     FetcherType.Should().Implement(
         FetcherInterface,
         "Because the implementaiton is internal and only accessible via the interface.");
 }
 public void The_fetcher_proxy_class_inherits_from_RestShallowObjectFetcher()
 {
     FetcherType.Should().BeDerivedFrom(
         typeof(RestShallowObjectFetcher),
         "Because it manages access to the Uri to this logical entity relative to the query.");
 }
예제 #13
0
 public void The_Fetcher_class_does_not_expose_the_method()
 {
     FetcherType.Should().NotHaveMethod(_expectedMethodName);
 }
 public void When_it_is_an_instance_property_then_the_Fetcher_class_does_not_expose_it()
 {
     FetcherType.Should().NotHaveProperty(_structuralInstanceProperty.Name);
 }