<commit_before>using System;
using Xunit;
// ReSharper disable ImpureMethodCallOnReadonlyValueField

namespace Beefeater.Tests.OptionTests
{
    public class WhenCreatingANoneOfOptionNullableIntThen
    {
        private readonly Option<int?> _option;

        public WhenCreatingANoneOfOptionNullableIntThen()
        {
            _option = Option<int?>.None;
        }

        [Fact]
        public void HasValueReturnsFalse()
        {
            Assert.False(_option.HasValue);
        }

        [Fact]
        public void ValueOrMinMatchesMin()
        {
            Assert.Equal(int.MinValue, _option.ValueOr(int.MinValue));
        }

        [Fact]
        public void ValueOrMaxMatchesMax()
        {
            Assert.Equal(int.MaxValue, _option.ValueOr(int.MaxValue));
        }

        [Fact]
        public void ExplicitCastToAnIntThrowsException()
        {
            Assert.Throws<InvalidOperationException>(() => (int)_option);
        }

        [Fact]
        public void CanExplicitCastBackToANullableInt()
        {
            var result = (int?)_option;

            Assert.Equal(null, result);
        }

    }
}<commit_msg>Added trait for other failing mono test<commit_after>using System;
using Xunit;
// ReSharper disable ImpureMethodCallOnReadonlyValueField

namespace Beefeater.Tests.OptionTests
{
    public class WhenCreatingANoneOfOptionNullableIntThen
    {
        private readonly Option<int?> _option;

        public WhenCreatingANoneOfOptionNullableIntThen()
        {
            _option = Option<int?>.None;
        }

        [Fact]
        public void HasValueReturnsFalse()
        {
            Assert.False(_option.HasValue);
        }

        [Fact]
        public void ValueOrMinMatchesMin()
        {
            Assert.Equal(int.MinValue, _option.ValueOr(int.MinValue));
        }

        [Fact]
        public void ValueOrMaxMatchesMax()
        {
            Assert.Equal(int.MaxValue, _option.ValueOr(int.MaxValue));
        }

        [Fact]
        [Trait("Category", "NotOnMono")]
        public void ExplicitCastToAnIntThrowsException()
        {
            Assert.Throws<InvalidOperationException>(() => (int)_option);
        }

        [Fact]
        public void CanExplicitCastBackToANullableInt()
        {
            var result = (int?)_option;

            Assert.Equal(null, result);
        }

    }
}
{'fraction_non_alphanumeric': 0.09129154396297855, 'fraction_numerical': 0.0, 'mean_word_length': 2.0216010165184244, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4672536', 'n_tokens_mistral': 676, 'n_tokens_neox': 653, 'n_words': 112}