Пример #1
0
    public void Adds_Custom_MimeType_To_HashSet()
    {
        // Arrange
        var name = Rnd.Str;
        var type = new MimeType(name);

        // Act
        var result = MimeType.AddCustomMimeType(type);

        // Assert
        Assert.True(result);
        Assert.Contains(MimeType.AllTest(),
                        x => x.Equals(type)
                        );
    }
Пример #2
0
    public void Does_Not_Add_Custom_MimeType_Twice()
    {
        // Arrange
        var name = Rnd.Str;
        var type = new MimeType(name);

        MimeType.AddCustomMimeType(type);

        // Act
        var result = MimeType.AddCustomMimeType(type);

        // Assert
        Assert.False(result);
        Assert.Contains(MimeType.AllTest(),
                        x => x.Equals(type)
                        );
    }