Esempio n. 1
0
        public void Equals_ResourceProviderWithDifferentProductionNumbers_ReturnsFalse()
        {
            var r1 = new OldResourceProvider(ResourceTypes.Brick, 2);
            var r2 = new OldResourceProvider(ResourceTypes.Brick, 3);

            r1.Equals(r2).ShouldBeFalse();
        }
Esempio n. 2
0
        public void Equals_ResourceProviderWithDifferentResourceTypes_ReturnsFalse()
        {
            var r1 = new OldResourceProvider(ResourceTypes.Brick, 2);
            var r2 = new OldResourceProvider(ResourceTypes.Grain, 2);

            r1.Equals(r2).ShouldBeFalse();
        }
Esempio n. 3
0
        public void Equals_ParameterIsSame_Returnstrue()
        {
            var r1 = new OldResourceProvider(ResourceTypes.Brick, 2);
            var r2 = r1;

            r1.Equals(r2).ShouldBeTrue();
        }
Esempio n. 4
0
        public void Equals_ResourceProviderWithSameResourceTypeAndProductionNumbers_ReturnsTrue()
        {
            var r1 = new OldResourceProvider(ResourceTypes.Brick, 2);
            var r2 = new OldResourceProvider(ResourceTypes.Brick, 2);

            r1.Equals(r2).ShouldBeTrue();
        }
Esempio n. 5
0
        public void Equals_ParameterIsNull_ReturnsFalse()
        {
            var r1 = new OldResourceProvider(ResourceTypes.Brick, 2);

            r1.Equals(null).ShouldBeFalse();
        }
Esempio n. 6
0
        public void Equals_ParameterIsOfDifferentType_ReturnsFalse()
        {
            var r1 = new OldResourceProvider(ResourceTypes.Brick, 2);

            r1.Equals(4).ShouldBeFalse(); // Will box value type.
        }