/*
   Copyright (c) 2018-2019 Nokia.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

#include <gtest/gtest.h>
#include "private/redis/contents.hpp"

using namespace shareddatalayer::redis;

TEST(ContentsTest, CanCompareEqual)
{
    EXPECT_FALSE((Contents { { "a", "b" }, { 1, 2 } }) == (Contents { { "a", "bb" }, { 1, 2 } }));
    EXPECT_FALSE((Contents { { "a", "bb" }, { 1, 3 } }) == (Contents { { "a", "bb" }, { 1, 2 } }));
}

TEST(ContentsTest, CanCompareNotEqual)
{
    EXPECT_TRUE((Contents { { "a", "b" }, { 1, 2 } }) != (Contents { { "a", "bb" }, { 1, 2 } }));
    EXPECT_TRUE((Contents { { "a", "bb" }, { 1, 3 } }) != (Contents { { "a", "bb" }, { 1, 2 } }));
}
