Example #1
0
    public void Empty_List_Returns_Empty_Json()
    {
        // Arrange
        var list = new EnumeratedList <Foo>();

        // Act
        var result = list.Serialise();

        // Assert
        Assert.Equal(JsonF.Empty, result);
    }
Example #2
0
    public void List_Returns_Json()
    {
        // Arrange
        var list = new EnumeratedList <Foo> {
            { Foo.A }, { Foo.B }
        };
        var json = $"[\"{Foo.A}\",\"{Foo.B}\"]";

        // Act
        var result = list.Serialise();

        // Assert
        Assert.Equal(json, result);
    }