Ejemplo n.º 1
0
        public void TranslateWithCountSegmentReturnsFalse()
        {
            IsCollectionTranslator translator = new IsCollectionTranslator();
            var segment = CountSegment.Instance;

            Assert.False(translator.Translate(segment));
        }
Ejemplo n.º 2
0
        public void TranslateWithPropertySetSegmentReturnsFalse()
        {
            IsCollectionTranslator translator = new IsCollectionTranslator();
            var segment = new PropertySegment(HardCodedTestModel.GetDogColorProp());

            Assert.False(translator.Translate(segment));
        }
Ejemplo n.º 3
0
        public void TranslateWithDynamicPathSegmentReturnsFalse()
        {
            IsCollectionTranslator translator = new IsCollectionTranslator();
            var segment = new DynamicPathSegment("test");

            Assert.False(translator.Translate(segment));
        }
Ejemplo n.º 4
0
        public void TranslateWithEntitySetSegmentReturnsTrue()
        {
            IsCollectionTranslator translator = new IsCollectionTranslator();
            var segment = new EntitySetSegment(HardCodedTestModel.GetPeopleSet());

            Assert.True(translator.Translate(segment));
        }
Ejemplo n.º 5
0
        public void TranslateWithNavigationPropertySegmentNonCollectionReturnsFalse()
        {
            IsCollectionTranslator translator = new IsCollectionTranslator();
            var segment = new NavigationPropertySegment(HardCodedTestModel.GetPersonMyDogNavProp(), null);

            Assert.False(translator.Translate(segment));
        }
        public void TranslateWithBatchSegmentReturnsFalse()
        {
            IsCollectionTranslator translator = new IsCollectionTranslator();
            var segment = BatchSegment.Instance;

            translator.Translate(segment).Should().BeFalse();
        }
        public void TranslateWithNavigationPropertyLinkSegmentReturnsFalse()
        {
            IsCollectionTranslator translator = new IsCollectionTranslator();
            var segment = new NavigationPropertyLinkSegment(HardCodedTestModel.GetPersonMyDogNavProp(), null);

            translator.Translate(segment).Should().BeFalse();
        }
        public void TranslateWithDynamicPathSegmentReturnsFalse()
        {
            IsCollectionTranslator translator = new IsCollectionTranslator();
            var segment = new DynamicPathSegment("test");

            translator.Translate(segment).Should().BeFalse();
        }
Ejemplo n.º 9
0
        public void TranslateWithBatchReferenceSegmentReturnsFalse()
        {
            IsCollectionTranslator translator = new IsCollectionTranslator();
            var segment = new BatchReferenceSegment(
                "$0", HardCodedTestModel.GetDogType(), HardCodedTestModel.GetDogsSet());

            Assert.False(translator.Translate(segment));
        }
Ejemplo n.º 10
0
        public void TranslateWithValueSegmentReturnsThrows()
        {
            IsCollectionTranslator translator = new IsCollectionTranslator();
            var segment = new ValueSegment(ModelBuildingHelpers.BuildValidEntityType());

            Action translateAction = () => translator.Translate(segment);

            translateAction.Throws <NotImplementedException>(segment.ToString());
        }
Ejemplo n.º 11
0
        public void TranslateWithKeySetSegmentReturnsFalse()
        {
            IsCollectionTranslator translator = new IsCollectionTranslator();
            var segment = new KeySegment(
                new List <KeyValuePair <string, object> >(),
                ModelBuildingHelpers.BuildValidEntityType(),
                null);

            Assert.False(translator.Translate(segment));
        }