Ejemplo n.º 1
0
        public void SetDetail_ToBoolean_WithSameValueAsDefault_DoesntAddDetail_True()
        {
            AnItem item = new AnItem();

            item.SetDetailAccessor("ADetail", true, true);

            Assert.That(item.Details.ContainsKey("ADetail"), Is.False);
        }
Ejemplo n.º 2
0
        public void SetDetail_WithBoolean_AddsDetail()
        {
            AnItem item = new AnItem();

            item.SetDetailAccessor("ADetail", false);

            Assert.That(item.Details["ADetail"], Is.Not.Null);
        }
Ejemplo n.º 3
0
        public void SetDetail_ToString_WithSameValueAsDefault_DoesntAddDetail()
        {
            AnItem item = new AnItem();

            item.SetDetailAccessor("ADetail", "howdy", "howdy");

            Assert.That(item.Details.ContainsKey("ADetail"), Is.False);
        }
Ejemplo n.º 4
0
        public void SetDetail_ToString_WithDefault_AddsStringDetail_WithSameValue()
        {
            AnItem item = new AnItem();

            item.SetDetailAccessor("ADetail", "hello", "howdy");

            Assert.That(item.Details["ADetail"].Value, Is.EqualTo("hello"));
        }
Ejemplo n.º 5
0
        public void SetDetail_ToString_WithDefault_AddsDetail()
        {
            AnItem item = new AnItem();

            item.SetDetailAccessor("ADetail", "hello", "howdy");

            Assert.That(item.Details["ADetail"], Is.Not.Null);
        }
Ejemplo n.º 6
0
        public void SetDetail_ToBoolean_AddsBooleanDetail()
        {
            AnItem item = new AnItem();

            item.SetDetailAccessor("ADetail", false);

            Assert.That(item.Details["ADetail"].ValueType, Is.EqualTo(typeof(bool)));
            Assert.That(item.Details["ADetail"].ValueTypeKey, Is.EqualTo(ContentDetail.TypeKeys.BoolType));
        }
Ejemplo n.º 7
0
        public void SetDetail_ToString_AddsStringDetail()
        {
            AnItem item = new AnItem();

            item.SetDetailAccessor("ADetail", "hello");

            Assert.That(item.Details["ADetail"].ValueType, Is.EqualTo(typeof(string)));
            Assert.That(item.Details["ADetail"].ValueTypeKey, Is.EqualTo(ContentDetail.TypeKeys.StringType));
        }