﻿using Xunit;

namespace Farity.Tests
{
    public class AlwaysTests
    {
        [Fact]
        public void AlwaysReturnsAFunctionThatReturnsTheSameValueAlways()
        {
            var answerToLifeUniverseAndEverything = F.Always(42);
            var answer = answerToLifeUniverseAndEverything();
            Assert.Equal(answer, answerToLifeUniverseAndEverything());
            Assert.Equal(answer, answerToLifeUniverseAndEverything(1));
            Assert.Equal(answer, answerToLifeUniverseAndEverything("string", null));
            Assert.Equal(answer, answerToLifeUniverseAndEverything(null, "str", 3));
            Assert.Equal(answer, answerToLifeUniverseAndEverything(null, null, null, null));
        }
    }
}
﻿using Xunit;

namespace Farity.Tests
{
    public class AlwaysTests
    {
        [Fact]
        public void AlwaysReturnsAFunctionThatReturnsTheSameValueAlways()
        {
            const int expected = 42;
            var answerToLifeUniverseAndEverything = F.Always(expected);
            Assert.Equal(expected, answerToLifeUniverseAndEverything());
            Assert.Equal(expected, answerToLifeUniverseAndEverything(1));
            Assert.Equal(expected, answerToLifeUniverseAndEverything("string", null));
            Assert.Equal(expected, answerToLifeUniverseAndEverything(null, "str", 3));
            Assert.Equal(expected, answerToLifeUniverseAndEverything(null, null, null, null));
        }
    }
}
Use expected in tests for F.Always
Use expected in tests for F.Always
