<commit_before>[![Build Status](https://travis-ci.org/dpreussler/Diacetyl.svg?branch=master)](https://travis-ci.org/dpreussler/Diacetyl)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/de.jodamob.android/Diacetyl/badge.svg)](https://maven-badges.herokuapp.com/maven-central/de.jodamob.android/Diacetyl)


Diacetyl
==========
 Diacetyl ... is added to some foods to impart its buttery flavor.
 (source: wikipedia)

 It adds artifical butterflavor to your Butterknife in test environments.
 When running unit tests you don't need to run Butterknife or similar as this
 might need real views which leads to the use of Robolectric or similar.


```java
class MyButterKnifeActivtiy {
    ...
    @Bind TextView textView;
    @Bind EditText editText;
    ...

class MyButterKnifeActivtiyTest {

  @Test 
  public void test() {
 	 MyButterKnifeActivtiy tested = new MyButterKnifeActivtiy();
	 Diacetyl.butterForTests(tested);
```

 Diacetyl initializes any android view for a given class with a Mock.
 There is no need to run Butterknife logic.
 It will use mocktoid mocks if available else simple mockito mocks

 It will ignore fields that already have a value
 It is not bound to Butterknife, it does not check for annotations.

You can pass multiple classes into, for viewholder for example.
```java
	 Diacetyl.butterForTests(viewHolder1, viewHolder2);
```

Gradle
======

```groovy
testCompile 'de.jodamob.android:Diacetyl:0.5'

```

TODO:
=====
* performance measurements and maybe optimization


Licensed under Apache 2.0
(c) 2016 <NAME>

Uses SuperReflect based on jOOR, 2011-2013, <NAME>, <EMAIL>, Apache 2.0<commit_msg>readme update<commit_after>[![Build Status](https://travis-ci.org/dpreussler/Diacetyl.svg?branch=master)](https://travis-ci.org/dpreussler/Diacetyl)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/de.jodamob.android/Diacetyl/badge.svg)](https://maven-badges.herokuapp.com/maven-central/de.jodamob.android/Diacetyl)


Diacetyl
==========
 Diacetyl ... is added to some foods to impart its buttery flavor.
 (source: wikipedia)

 It adds artifical butterflavor to your Butterknife in test environments.
 When running unit tests you don't need to run Butterknife or similar as this
 might need real views which leads to the use of Robolectric or similar.


```java
class MyButterKnifeActivtiy {
    ...
    @Bind TextView textView;
    @Bind EditText editText;
    ...

class MyButterKnifeActivtiyTest {

  @Test 
  public void test() {
 	 MyButterKnifeActivtiy tested = new MyButterKnifeActivtiy();
	 Diacetyl.butterForTests(tested);
```

 Diacetyl initializes any android view for a given class with a Mock.
 There is no need to run Butterknife logic.
 It will use mocktoid mocks if available else simple mockito mocks

 It will ignore fields that already have a value
 It is not bound to Butterknife, it does not check for annotations.

You can pass multiple classes into, for viewholder for example.
```java
	 Diacetyl.butterForTests(viewHolder1, viewHolder2);
```

Gradle
======

```groovy
testCompile 'de.jodamob.android:Diacetyl:0.5'

```

Todo
=====
* performance measurements and maybe optimization


License
-------

    Copyright 2016 <NAME>
    Uses SuperReflect based on jOOR, 2011-2013, <NAME>, <EMAIL>

    Both 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.


{'fraction_non_alphanumeric': 0.09614382490880667, 'fraction_numerical': 0.010422094841063054, 'mean_word_length': 4.20189701897019, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 8, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '551848', 'n_tokens_mistral': 1280, 'n_tokens_neox': 1132, 'n_words': 408}