Пример #1
0
            public void InitializesExplicitExtractors()
            {
                var target = new LandmineMvcAttribute(new[] { typeof(EmptyExtractor) });

                Assert.AreEqual(1, target.ContextProcessors.Count());
                Assert.IsTrue(target.ContextProcessors.Any(x => x.IdExtractor is EmptyExtractor));
            }
Пример #2
0
            public void InitializesDefaultExtractors()
            {
                var target = new LandmineMvcAttribute();

                Assert.IsTrue(target.ContextProcessors.Any(x => x.IdExtractor is SessionIdExtractor));
                Assert.IsTrue(target.ContextProcessors.Any(x => x.IdExtractor is UserHostExtractor));
            }
Пример #3
0
            public void SetterAndGetterInSync()
            {
                var target = new LandmineMvcAttribute {
                    LandmineName = "D6B1C3FAB8B3474C955E9D204EDD0B87"
                };

                Assert.AreEqual("D6B1C3FAB8B3474C955E9D204EDD0B87", target.LandmineName);
            }
Пример #4
0
            public void SetterAndGetterInSync()
            {
                var target = new LandmineMvcAttribute {
                    ExpectedValue = "5D0C2EA8BAB44ACFAD107ACAD809D90E"
                };

                Assert.AreEqual("5D0C2EA8BAB44ACFAD107ACAD809D90E", target.ExpectedValue);
            }
Пример #5
0
            public void ReturnsCorrectType()
            {
                var target = new LandmineMvcAttribute();

                Assert.IsInstanceOfType(target.Instance, typeof(Landmine));
            }