예제 #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);
        }
예제 #2
0
        public void SetDetail_WithBoolean_AddsDetail()
        {
            AnItem item = new AnItem();

            item.SetDetailAccessor("ADetail", false);

            Assert.That(item.Details["ADetail"], Is.Not.Null);
        }
예제 #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);
        }
예제 #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"));
        }
예제 #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);
        }
예제 #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));
        }
예제 #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));
        }